|
Oracle® Application Server Release Notes
10g Release 2 (10.1.2) for Microsoft Windows (64-Bit) on Intel Itanium B15849-03 |
|
![]() Previous |
![]() Next |
This chapter describes the general issues and workarounds in Oracle Application Server TopLink 10g (9.0.4.5). It includes the following topics:
|
Note: This chapter applies to all supported platforms. In OracleAS TopLink, file paths and script names are identical on all platforms. By default, this section uses the Windows file path separator (\). Substitute the file path separator that is specific for your platform. |
The following issues exist in OracleAS TopLink 10g (9.0.4.5):
When using Oracle JDBC 9.0.1 driver, resultSet.getTimestamp(int) returns oracle.sql.TIMESTAMP instead of java.sql.Timestamp. As a result, oracle.sql.TIMESTAMP is stored in DatabaseRow. Although OracleAS TopLink converts oracle.sql.TIMESTAMP to java.sql.Timestamp at a later stage for a successful read, serialization on an attribute of ValueHolderInterface type representing an object mapped to TIMESTAMP field will fail because DatabaseRow is an attribute of ValueHolder and oracle.sql.TIMESTAMP is not serializable.
This section describes the following XML parser dependency issues:
By default, both OC4J and OracleAS TopLink use the OracleAS XML Parser for Java v2. When using OC4J and OracleAS TopLink together, ensure that both use the same version of OracleAS XML Parser for Java v2. Failure to do so may result in XML parsing failures and application errors.
To determine what version of OracleAS XML Parser for Java v2 is used in your OracleAS TopLink installation:
Display the comment associated with the ORACLE_HOME\lib\xmlparserv2.jar file, where ORACLE_HOME is the directory in which you installed OracleAS TopLink.
On Microsoft Windows, configure WinZip to display comments by selecting Options and then Configuration. Select the Miscellaneous tab and ensure that the Show Comments When Opening Zip Files check box is checked. Open the ORACLE_HOME\lib\xmlparserv2.jar file with WinZip.
On UNIX, use the following file:
unzip -l ORACLE_HOME\lib\xmlparserv2.jar
The comment shows the build to which the xmlparserv2.jar file belongs. .
Ensure that this build is the same as the build associated with the OracleAS XML Parser for Java v2 used in OC4J.
When you install OracleAS TopLink in conjunction with the Oracle Application Server 10g Release 2 (10.1.2) installation, changes introduced to the OracleAS XML Parser for Java v2 in 10g Release 2 (10.1.2) can cause issues for users that use OracleAS TopLink 10g (9.0.4.5) in conjunction with BEA WebLogic Application Server, 8.1 (BEA CR136750).
You will encounter NoSuchMethodError associated with the constructor of the javax.xml.namespace.QName class. To resolve this problem, you must download the Sun Web Services Development Kit from Sun and place the jax-qname.jar file on their classpath before both the toplink.jar and weblogic.jar entries.
To download the Sun Web Services Development Kit, navigate to http://www.sun.com/
Crimson (http://xml.apache.org/crimson/) is the XML parser supplied in Java 2 Platform Standard Edition (J2SE) and in some Java API for XML Processing (JAXP) reference implementations.
If you use Crimson with the JAXP API to parse XML files whose system identifier is not a fully qualified URL, then XML parsing will fail with a not valid URL exception.
Other XML parsers defer validation of the system identifier URL until it is specifically referenced.
If you are experiencing this problem, then consider one of the following alternatives:
Ensure that your XML files use a fully qualified system identifier URL.
Use another XML parser such as the OracleAS XML Parser for Java v2.
OracleAS TopLink 10g (9.0.4.5) only supports UTF-8 encoding. The SAXParseException with OracleAS TopLink Exception Error Code 9006 occurs if you attempt to read a non-UTF-8 formatted XML file.
If the communication to the database is lost and restored after you configure a Login or Query to use statement caching, then previously cached statements may fail.
For example, it is a common practice to define an exception handler and register it with a Session using Session.setExceptionHandler(). When the exception handler is invoked to handle a loss of communication and the handler reestablishes the connection to the database, any attempt to rerun a previously cached statement fails.
When using OracleAS TopLink with WebSphere Application Server 5.1, it is recommended that applications should be configured and deployed with their class loader mode set to PARENT_LAST.
To configure an application with its class loader mode set to PARENT_LAST, select one of the following options:
Remove or rename the JAVA_HOME\lib\jaxp.properties file, where JAVA_HOME refers to WebShpere_Install\java\jre.
Place the xerces library included in the WebSphere installation after xmlparserv2.jar in the same shared library. This file is located in WebShpere_Install\java\jre\lib\xml.jar.
The following issues exist in OracleAS TopLink Mapping Workbench 10g (9.0.4.5):
Section 7.1.6.3, "Refreshing Descriptors with Dependent Classes"
Section 7.1.6.5, "OracleAS TopLink Sessions Editor Preferences"
Section 7.1.6.9, "Improper Set Method for Array Type Attributes"
You cannot map inherited attributes on a descriptor whose superclass has no descriptor. You can select the root descriptor but cannot map its attributes.
To map the project, import the superclass into the project. OracleAS TopLink Mapping Workbench creates a descriptor for the superclass. Then, deactivate this descriptor or remove it from the project.
If you change a descriptor to an interface or abstract class in code instead of using OracleAS TopLink Mapping Workbench, then you might get the ExternalClassNotFoundException exception when you refresh the class in OracleAS TopLink Mapping Workbench.
For example, a project contains two descriptors, Employee and EmployeeInterface. Both are classes, and Employee extends EmployeeInterface. Using code, you edit the EmployeeInterface class to change it to an interface and make Employee implement the interface. When you refresh the classes in OracleAS TopLink Mapping Workbench, you will receive the ExternalClassNotFoundException error.
To avoid this situation, refresh EmployeeInterface first, and then refresh Employee.
When you refresh a descriptor, OracleAS TopLink Mapping Workbench does not refresh dependent classes if they are not included in the OracleAS TopLink Mapping Workbench project.
For example, if you define a descriptor with an after-load class and method, which is not included in the OracleAS TopLink Mapping Workbench project, and you change the after-load class without using OracleAS TopLink Mapping Workbench, then when you refresh the descriptor, the OracleAS TopLink Mapping Workbench does not pick up the change.
To workaround this issue, add all dependent classes to the OracleAS TopLink Mapping Workbench project. Right-click each dependent class and deselect the Activate Descriptor option because you do not map these options. Now, when you refresh the project, the OracleAS TopLink Mapping Workbench refreshes both descriptors and dependent classes.
If the path to your JDBC drivers contains spaces, then the path must be enclosed in double quotes in the setenv.cmd file. For example:
set JDBC_CLASSPATH="C:\Program Files\some directory\driver.jar\"
Before changing any other general preferences, such as the text editor location, you must select the default Look and Feel in the General Preferences dialog box and click OK. Then reopen the General Preferences dialog box and make any additional changes.
On the Microsoft Windows platform, if your classpath contains directories with names that have spaces in them, then the OracleAS TopLink Mapping Workbench may fail to start and displays the error Cannot Find Main Class.
If this is the case, then consider removing spaces from directory names in the JDBC, Oracle home, and JRE classpaths.
Changing the icon size of the OracleAS TopLink Mapping Workbench toolbar may cause the application to fail at next startup. You must edit the workbench.xml file and change small-icon=false to true.
If you attempt to generate source code for a descriptor but cancel the process before OracleAS TopLink Mapping Workbench writes the new source code, then a dialog box is displayed indicating that the source code was successfully updated. However, if you cancel the process, then OracleAS TopLink Mapping Workbench does not overwrite any existing code.
OracleAS TopLink Mapping Workbench 10g (9.0.4.5) does not support generating Project Java Source for Descriptors mapped to inner classes.
If you attempt to generate source code from a table with BLOBs, then the generated Java code may contain errors in the type definition and method parameters. You must edit the source code to eliminate the errors.
The following issue exists with the OracleAS TopLink Web client:
If you configure the OracleAS TopLink Web Client with OC4J 10g (9.0.4), then ensure that the uix2.jar file used by the Web Client is properly referenced. Add the following to the OC4J application.xml file, where your ORACLE_HOME is OraHome1:
<library path="\OraHome1\jlib\uix2.jar" \>
The following issues exist in the OracleAS TopLink Examples:
The duplicate entries of ibm-application*.xmi in bmp.ear cause a Save Failure Exception when deploying the BMP example on IBM WebSphere 5.0.2. To correct this, comment out the following element inside build.ear in the build.xml file:
<metainf dir="${config.dir}">
<include name="ibm-application*.xmi"/>
</metainf>
This section describes the known errors in the documentation. It includes the following topics:
Section 7.2.3, "Configuring the OracleAS TopLink Web Client"
Section 7.2.4, "OracleAS TopLink Mapping Workbench Tutorial"
The Oracle Application Server TopLink Application Developer's Guide incorrectly states that you cannot use batch writing and parameterized SQL together.
The sequencing code examples, Example A-2 and Example A-3, in the Oracle Application Server TopLink Application Developer's Guide are incorrect. Example 3-22 and Example 3-23 illustrate the correct code examples for using sequencing with stored procedures.
In the "Configuring the Web Client" section of the Oracle Application Server TopLink Application Developer's Guide, the correct path to the web.xml file should be:
ORACLE_HOME\toplink\config\toplinkwc.When using the Web Client with OC4J, replace the path indicated in the document:
ORACLE_HOME\toplink\examples\oc4j\904\server\
with your local J2EE_HOME directory.
To deploy to BEA WebLogic, you must also define a reference to this datasource in the ORACLE_HOME\toplink\config\toplinkwc\weblogic.xml file, as follows:
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/DataSourceName</res-ref-name>
<jndi-name>jdbc/DataSourceName</jndi-name>
</resource-description>
</reference-descriptor>
In the "Configuring the Application Server" section, the first step of the procedure, where you are instructed to copy the toplinkwc.ear file to an application server-specific directory, is not required. When you run the assembleWebClient script located in the ORACLE_HOME\toplink\bin directory, the system assembles and deploys the toplinkwc.ear file for you, as specified in the build.properties file.
When completing the tutorials in Oracle Application Server TopLink Mapping Workbench User's Guide, be aware of the following changes:
To use sequencing, in addition to creating the sequence table from OracleAS TopLink Mapping Workbench, you must also create the sequence table in the database.
When creating the sequence table, use size 38 for both SEQ_NAME and SEQ_COUNT.
When implementing inheritance for the BaseProject descriptor, ensure that the Read Subclass On Query option is selected.
Figure B-49 incorrectly omits the BaseProject class indicator type. Although BaseProject is an abstract class and does not require an indicator value, it is listed on the Inheritance tab.
In Example B-4, the line:
president.addPhoneNumber(homeNumber);
should be replaced with:
president.addPhoneNumber(homePhone);