PQ76912: USING ORACLE DB CONNECTION RESULTS IN DB2 CONNECTION TRYING TO BE USED. DB2SQLJCONNECTION ERROR SQLSTATE=42505 AND SQLCODE=-922

 A fix is available

Obtain the fix for this APAR



APAR status
Closed as program error.

Error description
WebSphere V5 users trying to use Oracle JDBC Thin Driver
(or any other 'non-DB2 JDBC Driver') will see the following
 in the output of the WebSphere server where the JDBC driver
 is being installed.  The Stack Trace has the following:
 .
 error getting the conection!
 com.ibm.db2.jcc.DB2SQLException: DB2SQLJConnection error in
   native method: constructor: CONNECT 00E70122..
   SQLSTATE=42505 and SQLCODE=-922
 at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.setError
    (DB2SQLJConnection.java:2136)
 at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.<init>
    (DB2SQLJConnection.java:502)
 at com.ibm.db2.jcc.DB2PooledConnection.<init>
    (DB2PooledConnection.java:111)
 at com.ibm.db2.jcc.DB2ConnectionPoolDataSource.
    getPooledConnection(DB2ConnectionPoolDataSource.java:165)
 at com.ibm.db2.jcc.DB2ConnectionCache.getConnection
    (DB2ConnectionCache.java:681)
 at com.ibm.db2.jcc.DB2DataSource.getConnection
    (DB2DataSource.java:153)
 at com.ibm.ws390.xaadapter.WS390DB2XADriverImpl.connect
    (WS390DB2XADriverImpl.java:170)
 at java.sql.DriverManager.getConnection(DriverManager.java:543)
 at java.sql.DriverManager.getConnection(DriverManager.java:163)
 at oracle.jdbc.pool.OracleDataSource.getConnection
    (OracleDataSource.java:169)
 at oracle.jdbc.pool.OracleConnectionPoolDataSource.

 at oracle.jdbc.pool.OracleConnectionPoolDataSource.
    getPooledConnection(OracleConnectionPoolDataSource.java:95)
 .
Local fix
To successfully use the Oracle connector (or any connector other
than DB2) the user can make the following change in the
WebSphere for z/OS hfs directory.
In the ' <was-install-dir-name>/lib ' directory, (which if the
defaults were taken will be ' /usr/lpp/zWebSphere/V5R0M0/lib '
In this /lib directory, is a file named xaadapter.jar.
This fail needs to be renamed to something that does not have
'.jar' as it's suffix.
e.g. xaadapter.jarSave
.
By changing the name of this jar file, it will prevent the
xaaadapter from being loaded.
This 'xaadapter' is used for 'CTS' (Compliance Suite Testing),
and is NOT needed for normal operation.
.
The following exception will be thrown:
' java.lang.ClassNotFoundException:
  com.ibm.ws390.xaadapter>WS390DB2XADriverImpl '
.
This will be in the server's trace output.  This exception
can be safely ignored.  The removal of the xaadapter.jar from
processing will cause no harm, UNLESS the CTS testing is run.
Problem summary
****************************************************************
* USERS AFFECTED: All users of WebSphere Application Server    *
*                 V5.0 for z/OS                                *
****************************************************************
* PROBLEM DESCRIPTION: Obtaining a connection with an Oracle   *
*                      DataSource or by using                  *
*                      DriverManager.getConnection() fails.    *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
Errors may occur when an application attempts to obtain a
connection from an Oracle DataSource or by using the
DriverManager.getConnection() API to obtain a JDBC connection.

This problem can be identified by looking for a section of a
stack trace similar to this one:

at com.ibm.db2.jcc.DB2DataSource.getConnection
  (DB2DataSource.java:153)
at com.ibm.ws390.xaadapter.WS390DB2XADriverImpl.connect
  (WS390DB2XADriverImpl.java:170)
at java.sql.DriverManager.getConnection(DriverManager.java:543)
at java.sql.DriverManager.getConnection(DriverManager.java:163)
at oracle.jdbc.pool.OracleDataSource.getConnection
  (OracleDataSource.java:169)
Problem conclusion
Previously, the WS390DB2XADriverImpl driver was not properly
filtering the urls of connection requests, and therefore it
would return a DB2 connection even when other types of
connections were requested.  The driver was fixed to properly
detect the urls of connections that it can handle, and to return
null in all other cases.

APAR PQ76912 is associated with SERVICE LEVEL W501000 of
WebSphere Application Server V5.0 for z/OS.
Temporary fix Comments
APAR information
APAR number PQ76912
Reported component name WEBSPHERE FOR Z
Reported component ID 5655I3500
Reported release 500
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Special Attention NoSpecatt
Submitted date 2003-07-29
Closed date 2003-09-17
Last modified date 2003-10-03

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
BBOUBINF          

Publications Referenced

Fix information
Fixed component name WEBSPHERE FOR Z
Fixed component ID 5655I3500

Applicable component levels
R500 PSY UQ80305    UP03/09/25 P F309

  Fix is available
Select the PTF appropriate for your component level. You will be required to sign in. Distribution on physical media is not available in all countries.


Document Information


Current web document: swg1PQ76912.html
Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server for z/OS
Operating system(s):
Software version: 500
Software edition:
Reference #: PQ76912
IBM Group: Software Group
Modified date: Oct 3, 2003