WebSphere Adapter for JDBC
Some of the problems you may encounter running the Adapter for JDBC with your database are provided, along with solutions and workarounds. These problems and solutions are also documented as technotes on the software support Web site.
Problem
When a business object is generated from an Oracle database object, an attribute is not created in the business object for columns of type NCHAR.
Cause
The JDBC driver returns the type of the column as Other, which is not supported by enterprise service discovery.
Solution
Use the Business Object Designer tool to manually add attributes for supported types to the business object.
Problem
It is not possible to use
JDBC enterprise service discovery after using a connection to the database
in the Data perspective. At the end of the second panel of the enterprise
service discovery wizard, the following exception is generated: com.ibm.adapter.framework.api.ImportException
Reason:
class loading constraint violated (class:
oracle/jdbc/driver/OracleConnection
method:
getWrapper()Loracle/jdbc/OracleConnection;) at pc:0
Cause
The error occurs because the Data Perspective and enterprise service discovery use their own class loaders. Once the DLL, which is the native library used by the JDBC driver, is loaded in the Data Perspective, it cannot be loaded again in enterprise service discovery. JVMs have an inherent restriction that only allows one class loader to load native libraries at any given time. So if class loader A loads DLL B, then no other class loader can load DLL B until class loader A is released and garbage is collected. Because you cannot really control garbage collection, it usually means that if you want to load DLL B with another class loader, you need to restart the JVM. This limitation is a known one and is documented for WebSphere® Application Server.
Solution
The only solution is to restart WebSphere® Integration Developer when this error occurs.
Problem
When the Adapter for JDBC is used to perform an XA transaction using Oracle 10g, the adapter generates a closed connection exception: javax.resource.ResourceException: Closed Connection.
Cause
This is a known issue with the Oracle 10g database driver. The following bug has been filed with Oracle for this issue: 3488761 Connection closed error from OracleConnection.getConnection() - 10G drivers.
Solution
The bug has been fixed in the Oracle 10g Release 2 driver. As a workaround, you can use the Oracle 9i JDBC thin drivers to connect to the database for XA transactions.
Problem
When the Adapter for JDBC is used to perform an XA transaction using Oracle database, the following error is generated: WTRN0078E: An attempt by the transaction manager to call start on a transactional resource has resulted in an error. The error code was XAER_RMERR.
Cause
For the Oracle database server to support XA transactions, some commands need to be run.
Solution
<ORACLE_HOME>javavm\install file: initxa.sql file: initjvm.sql
The initxa.sql script configures the database for XA. Once it runs successfully, your database is configured for XA. The script might run successfully the first time you try. Unfortunately, it probably will not run successfully because some of the database's memory spaces are too small.
<ORACLE_HOME>\database file: init<DATABASE_SID>.ora
Parameter Name | Minimum Value |
---|---|
java_pool_size | 12000000 |
shared_pool_size | 24000000 |
Problem and Cause
DB2® on z/OS® supports querying stored procedure metadata by using positional index by default and not using column name, which the Adapter for JDBC uses. The solution provides the steps for using the WebSphere Adapter for JDBC with DB2 on the z/OS platform.
Solution
To connect to DB2® on z/OS® using the Adapter for JDBC or using DB2 Connect™ with JDBC API, ensure that the following connection requirements are met:
Type 2: jdbc:db2:database
(For example: jdbc:db2:MyDB, where MyDB is the database name)
Type
4: jdbc:db2://server:port/database
(For example: jdbc:db2://9.182.15.129:50000/MyDB,
, where MyDB is the database name)
The driver class for both Type 2 and Type 4 drivers is the same.
The license JAR file is the same for both Type 2 and Type 4 drivers. Access to DB2 for z/OS and DB2 for i5/OS® servers requires a valid DB2 Connect™ license. DB2 clients do not provide direct connectivity to zSeries® and iSeries™ servers without a DB2 Connect license.
For
more information on DB2 Connect licensing and usage, refer to the
following pages:
http://www-128.ibm.com/developerworks/db2/library/techarticle/0303zikopoulos1/0303zikopoulos1.html
http://www-128.ibm.com/developerworks/db2/library/techarticle/0301zikopoulos/0301zikopoulos.html
There might be issues with importing metadata for stored procedures using enterprise service discovery. To use stored procedures and import metadata from DB2 using the Adapter for JDBC, DB2 needs to be reconfigured as described in the following steps. Follow these steps in addition to the steps provided above:
This applies only to the English language version.
Problem
The WebSphere Business Integration Adapter for JDBC did not expose support for transactions to the integration broker (WebSphere InterChange Server). This created a problem when users wanted to ensure that two unrelated objects, for example, a customer and an order, were created in their enterprise information system (EIS) at the same time.
To do this, two separate requests had to be sent, and if the adapter went down between requests, only one of the objects was created. Because of limitations of the WebSphere InterChange Server adapter interface, the solution was to allow users to send multiple requests in a single batch to the adapter through a wrapper object. This wrapper object was a dummy container to hold 1..n child business objects, and a commit to the backend database was issued only after each of the child business objects was processed successfully.
Solution
The new WebSphere Adapter for JDBC (JCA) supports local and global transactions. Now, when you want to send a request that simultaneously creates a customer and an order, for example, you can start a transaction from an adapter client (for example, a mediation or business process) and send the requests as you see fit. Once you have sent everything you want to send, you commit the transaction. There is no need for a wrapper business object.
This provides the steps, database versions, and configuration requirements for XA transaction support using the Adapter for JDBC with a remote DB2 database.
Using XA Transactions on a remote DB2 database
Adding a remote DB2 database
Perform the following four tasks–adding the remote system, adding an instance node, adding a database, and testing the database connection–in the order in which they are described.
Adding the remote system
Adding an instance node
Adding a database
Testing the database connection
Using XA Transactions with the Adapter for JDBC using Universal Driver
Problem
If you create and bind an import and an export to the same adapter instance (with the same AdapterID property) and you name the logs for the two bindings differently, for example: "a.log" for the import and "b.log" for the export, you will find after deploying the project to WebSphere Process Server, that the resource adapter has only one log, the one named "b.log."
Cause
WebSphere® Adapters do not distinguish messaging from inbound and outbound operations, and therefore create only one adapter log file.
Solution
Configure the inbound and outbound operations with the same log name if Import and Export are binding to the same adapter instance. If the inbound and outbound belong to different adapters and each has a different AdapterID, this issue will not exist.
Last updated: Tue 12 Dec 2006 03:32:39
(c) Copyright IBM Corporation 2005, 2006.
This information center is powered by Eclipse technology (http://www.eclipse.org)