PQ76912: USING ORACLE DB CONNECTION RESULTS IN DB2 CONNECTION TRYING TO BE USED. DB2SQLJCONNECTION ERROR SQLSTATE=42505 AND SQLCODE=-922 | |||||||||||||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||||||||||||
![]() 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 is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
Publications Referenced
|
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
(C) Copyright IBM Corporation 2000, 2009. All Rights Reserved.