Skip Headers
Oracle® Application Server Release Notes
10g Release 3 (10.1.3.1.0) for Linux x86

Part Number B31014-11
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

15 Oracle TopLink

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

15.1 General Issues and Workarounds

This section describes general issues and workarounds. It includes the following topics:

15.1.1 Object-Relational Issues

This section contains information on the following issues:

15.1.1.1 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.

15.1.1.2 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:

@Stateless
public class MySessionBean
{
    @Resource 
    SessionContext sc;
    
    public void someMethod()
    {
        ...
        sc.setRollbackOnly();
    }
}

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

@Stateless
@TransactionManagement(TransactionManagementType.BEAN)
public class MySessionBean implements SomeInterface 
{
    @Resource
    SessionContext sc;
    
    public void someMethod() 
    {
        sc.getUserTransaction().begin();
        ...
        sc.getUserTransaction().rollback();
    }
} 

15.1.1.3 ReportQuery Results for Aggregate Functions may be Truncated

When using a ReportQuery to return calculated values, the data type of the column is used to convert the returned results. As a result, values returned for mapped attributes using average, variance, and standard deviation will be converted into the mapped attribute type and could result in loss of precision through truncation.

To work around this issue, use the field instead of the attribute's query key. For example:

  • Using the attribute's query key results in truncated value:

    rq.addAverage("salary");

  • Use the database column instead to avoid truncation:

    rq.addAverage("salary", eb.getField("SALARY.SALARY"));

15.1.1.4 Attribute Joining of One-to-One Mappings not Supported with Inheritance

It is not possible to execute a query on a class involved in an inheritance hierarchy which also has one-to-one joined attributes configured. This issue has already been addressed in TopLink Essentials and the solution will be available in the next release or a patch-set of this release.

15.1.1.5 Using Oracle Database Advanced Data Types may Fail with Some Data Sources

When using Oracle9i and Oracle10g database platform-provided advanced data types with some data source implementations, failures may occur. The platform does not or cannot correctly unwrap the raw Oracle specific JDBC connection and cannot complete the necessary conversions. To avoid this issue, you can use TopLink internal connection pooling.

15.1.1.6 Returning Policy with Optimistic Locking

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

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

15.1.1.7 Using Timestamp

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. You should use a driver that returns Timestamp or change the policy to use local time instead of server time.

15.1.1.8 Configuring Sequencing in sessions.xml

When configuring a custom sequence table for a session, TopLink Workbench will throw an exception and your edits will not be written to the sessions.xml when it is saved. As a workaround, configure sequencing at the project level. See "Configuring Sequencing at the Project Level" in the Oracle TopLink Developer's Guide for details.

15.1.2 Object-XML (JAXB) Issues

This section contains information on the following issues:

15.1.2.1 Using Non-ASCII Characters with a JAXB 1.0 TopLink Project

When you generate class and method names that include non-ASCII characters, TopLink will throw an exception. This problem occurs when creating a JAXB 1.0 TopLink project from an XML schema that contains non-ASCII characters. Ensure that your XML schema does not contain any non-ASCII characters.

15.1.2.2 XML Document Preservation

XML document preservation enables the partial conversion of an XML document into its mapped object model. The XML contents are preserved so that unmapped content is not lost and is included when object is marshalled back into XML.

When using the Preserve Document option with an XML descriptor, you must also set the option on all other root descriptors.

When using document preservation, only a root object can be marshaled. Attempting to marshal a non-root object with document preservation on will result in an exception.

15.1.2.3 Multiple Composite Object Mappings Using Self "." XPath not Supported

TopLink supports only a single composite object mapping using the self (".") XPath. This does not restrict the number of composite object mappings, only the number of mappings where the composite object is mapped into the parent element instead of a child element.

15.1.2.4 Marshalling a Non-root Object with Document Preservation

When using document preservation (see "Configuring Document Preservation" in the Oracle TopLink Developer's Guide), only a root object can be marshalled. Attempting to marshal a non-root object with document preservation on will result in an exception.

15.1.3 Miscellaneous Issues

This section contains information on the following issues:

15.1.3.1 Using JDK 1.6u1 with Linux Platforms

When launching Oracle TopLink Workbench using JDK 1.6u1 on a Linux platform, the following output error may appear every 30 seconds:

java.util.prefs.FileSystemPreferences syncWorld
WARNING: Couldn't flush user prefs: java.util.prefs.BackingStoreException:
java.lang.IllegalArgumentException: indent-number.

This error appears due to a bug in the Sun JDK 1.6 (6396599). As a result of this bug, you cannot save your TopLink Workbench preferences. You can minimize the error log and continue to work, without incident, although the error will continually be written to the log.

15.1.3.2 Shared Installation

By default, the TopLink installation allows only the user who performed the installation to access the installed files. If your TopLink installation is in a shared environment you must manually change the file permissions for all files in the <ORACLE_HOME> directory after completing the installer. Executable files require read and execute access; non-executable files require read access. Refer to your operating system documentation for information on setting file permissions.

15.1.3.3 Welcome Page

After installing Oracle TopLink, the Welcome page will appear in English – regardless of the language you selected during installation. To display your language-specific select the appropriate file in the <ORACLE_HOME>\toplink\doc\ folder.

15.2 Documentation Errata

This section includes information on the following issue:

15.2.1 Creating project.xml Programatically

The command for creating the project.xml file programatically, as listed in the Oracle TopLink Developer's Guide, is incorrect. The correct command is:

java -classpath toplink.jar;toplinkmw.jar;xmlparserv2.jar;ejb.jar;oracle.toplink.workbench.mappings.DeploymentXMLGenerator <MW_Project.mwp> <output file.xml>