Skip Headers
Oracle® Fusion Middleware Release Notes
11g Release 1 (11.1.1) for HP-UX PA-RISC (64-Bit)

Part Number E14775-06
Go to Documentation Home
Go to Book List
Book List
Go to Table of Contents
Go to Feedback page
Contact Us

Go to previous page
Go to next page
View PDF

8 Oracle TopLink

This chapter describes issues associated with Oracle TopLink. It includes the following topics:

8.1 General Issues and Workarounds

This section describes general issue and workarounds. It includes the following topic:

8.1.1 TopLink Object-Relational Issues

This section contains information on the following issues: Incorrect outer join SQL on SQLServer2005

TopLink generates incorrect outer join for SQL Server v2005. The outer join syntax generated is correct for earlier versions of this database. To work around this limitation, reconfigure the database compatibility (refer to the SQLServer documentation for details). Alternatively, you can use a custom TopLink database platform. UnitOfWork.release() not Supported with External Transaction Control

A unit of work synchronized with a Java Transaction API (JTA) will throw an exception if it is released. If the current transaction requires its changes to not be persisted, the JTA transaction must be rolled back.

When in a container-demarcated transaction, call setRollbackOnly() on the EJB/session context:

public class MySessionBean
{    @Resource 
    SessionContext sc;
    public void someMethod()

When in a bean-demarcated transaction then you call rollback() on the UserTransaction obtained from the EJB/session context:

public class MySessionBean implements SomeInterface 
    SessionContext sc;
    public void someMethod() 
} Returning Policy for UPDATE with Optimistic Locking

The returning policy, which allows values modified during INSERT and UPDATE to be returned and populated in cached objects, does not work in conjunction with numeric version optimistic locking for UPDATE. The value returned for all UPDATE operations is 1 and does not provide meaningful locking protection.

Do not use a returning policy for UPDATE in conjunction with numeric optimistic locking.

The use of returning policy for INSERT when using optimistic locking works correctly. JDBC Drivers returning Timestamps as Strings

TopLink assumes that date and time information returned from the server will use Timestamp. If the JDBC driver returns a String for the current date, TopLink will throw an exception. This is the case when using a DB2 JDBC driver.

To work around this issue, consider using a driver that returns Timestamp (such as or change the policy to use local time instead of server time.

Another option is to use a query re-director on the ValueReadQuery used by the platform:

ValueReadQuery vrq = new ValueReadQuery(
    "SELECT to_char(sysdate, 'YYYY-MM-DD HH:MM:SS.SSSSS') FROM DUAL"
vrq.setRedirector(new TSQueryRedirector());
class TSQueryRedirector implements QueryRedirector 
    public Object invokeQuery(DatabaseQuery query, Record arguments, Session session)
        String value = (String)session.executeQuery(query);
        return ConversionManager.getDefaultManager().convertObject(
            value, java.sql.Timestamp.class
} Proxy Authentication with Oracle Containers for Java EE (OC4J) Managed Data Sources

Proxy authentication does not work with OC4J managed data sources. Instead of using the data source provided by the application server, you must create a data source yourself.

Refer to the "Configuring Oracle Database Proxy Authentication" in the Oracle Fusion Middleware Developer's Guide for Oracle TopLink for more information.

For example, replace this code:

    new OracleJDBC10_1_0_2ProxyConnector(

with the following:

oracle.jdbc.pool.OracleDataSource ds = new oracle.jdbc.pool.OracleDataSource();
login.setConnector(new OracleJDBC10_1_0_2ProxyConnector(ds)); Unit of Work does not add Deleted Objects to Change Set

When accessing the change set of a Unit of Work to determine what has changed, objects that are pending deletion (such as uow.deleteObject( ) and uow.deleteAllObjects( )) will not be returned from the result set.

The objects pending deletion are only available through the Unit of Work getDeletedObjects call.

8.1.2 TopLink Workbench Issues

This section contains information on the following issues: Accessibility

Due to an issue with HP-UX JDK 1.6, if NullPointExecption error dialog is generated when saving a file, the error dialog window is not in focus.

8.1.3 TopLink Grid (Coherence Integration)

This section contains information on the following issue: Lazy Collections

When using an attribute-level change tracking woven entity, changes made to lazy collections may not be reflected within the Coherence Cache – only the modification event is recorded. This issue is only present when attribute-level change tracking is enabled, and will not occur if the persistence unit property eclipselink.weaving.changetracking is set to false.

The recommended workaround is to ensure that the lazy collection is retrieved with size() before modifying the collection. Read/Write Configuration

When using a Coherence Read/Write configuration, relationships using lazy loading are written to the Coherence Cache correctly, but may not be updated in the database.

The recommended work around is to configure the relationship as eager. Alternatively, you can use the Coherence Read configuration instead of Read/Write.

8.1.4 Oracle Database Extensions with TopLink

This section contains information on the following issue: Template JAR for Spatial and XDB Support in Oracle WebLogic Server

To fully support Oracle Spatial and Oracle XDB mapping capabilities (in both standalone Oracle WebLogic Server and the Oracle JDeveloper integrated WebLogic Server), you must use the toplink-spatial-template.jar and toplink-xdb-template.jar to extend the WebLogic Server domain to support Oracle Spatial and XDB, respectively.

To extend your WebLogic Server domain:

  1. Download the toplink-spatial-template.jar (to support Oracle Spatial) and toplink-xdb-template.jar (to support Oracle XDB) files from:

  2. Copy the following files:

    File From...Foot 1  To...Foot 2 
    To support Oracle Spatial:
      sdoapi.jar <ORACLE_DATABASE_HOME>/md/jlib <WEBLOGIC_HOME>/server/lib
    To support Oracle XDB:
      xdb.jar <ORACLE_DATABASE_HOME>/rdbms/jlib <WEBLOGIC_HOME>/server/lib
      xml.jar <ORACLE_DATABASE_HOME>/lib <WEBLOGIC_HOME>/server/lib
      xmlparserv2.jar <ORACLE_DATABASE_HOME>/lib <WEBLOGIC_HOME>/server/lib

    Footnote 1 These are the default locations. Your actual location may vary depending on your specific environment, installed options, and version.

    Footnote 2 When using Oracle JDeveloper integrated WebLogic Server, the <WEBLOGIC_HOME> is located within the <JDEVELOPER_HOME> directory.


    Although the actual JAR file may be named differently in your From directory, the file must be named as shown, when copied to the To directory.
  3. Launch the Config Wizard (<WEBLOGIC_HOME>/common/bin/ (or .bat).

  4. Select Extend an existing WebLogic domain.

  5. Browse and select your WebLogic Server domain.

    When using JDeveloper with integrated WebLogic Server, the typical WebLogic Server domain location may be similar to:

    • In Windows environments: %APPDATA%\JDeveloper\systemXX.XX.XX.XX\DefaultDomain

      where XX.XX.XX.XX is the unique number of the product build.

      For Windows platforms, you must enable the Show hidden files and folders folder option.

    • In non-Windows environments, the default location is under the current user's default home directory: <$Home>/DefaultDomain

    Refer to the Oracle JDeveloper documentation for details.

  6. Select Extend my domain using an existing extension template.

  7. Browse and select the required template JAR (toplink-spatial-template.jar for Oracle Spatial, toplink-xdb-template.jar for Oracle XDB).

  8. Complete the remaining pages of the wizard.