PQ97168: ORA-12545 WITH SQLSTATE 66000 COULD NOT BE MAPPED TO A STALECONNECTIONEXCEPTION EVEN USING CUSTOM MAPPING | |||||||||||||||||||||||||||||||||
![]() |
|||||||||||||||||||||||||||||||||
![]() APAR status Closed as program error. Error description EXTERNAL SYMPTOMS: Using an Oracle database driver, an attempt is made to connect to a database and the connection fails with a java.sql.SQLException: ORA-12545: Connect failed because target host or object does not exist . If the custom mapping for WebSphere is used to try to map this exception to a StaleConnectionException, using the statement errorMap= SS66000=com.ibm.websphere.ce.cm.StaleConnectionException; or errorMap= EC12545=com.ibm.websphere.ce.cm.StaleConnectionException; How one does the mapping is described in technote, 1104975. It is set on the Use the ?errorMap? property on a DataSource. MESSAGES LOGGED: CONM6009E: Failed to get connection to the database from datasource (LIVE_INSTANCE). java.sql.SQLException: ORA-12545: Connect failed because target host or object does not exist at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) at oracle.jdbc.oci8.OCIDBAccess.check_error(OCIDBAccess.java:2337) at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:480) at oracle.jdbc.driver.OracleConnection.<init> (OracleConnection.java:362) at oracle.jdbc.driver.OracleDriver.getConnectionInstance (OracleDriver.java:536) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:328) Here is a part of trace output. --- 04/11/05 14:40:31:880 JST 4b07ef CMProperties D setting errorMap=SS66000=com.ibm.websphere.ce.cm.StaleConnectionExceptio n; : : : 04/11/05 14:40:31:897 JST 4b07ef CMProperties < <init> CMProperties for DataSource "LIVE_INSTANCE" DataSource Properties oracle.jdbc.pool.OracleConnectionPoolDataSource : {URL=jdbc:oracle:oci:@LIVSR_APS;user=aps;password=XXXXXXXX;} Connection Pool Properties: dataBaseVersion = 0 : : errorMap = {66000=class com.ibm.websphere.ce.cm.StaleConnectionException} : : 04/11/05 14:42:51:428 JST 1126f6 ConnectionPoo < createConnection java.sql.SQLException: ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) : : 04/11/05 14:42:51:431 JST 1126f6 PortabilityLa > translateException Error Code = 12514 SQL State = 66000 java.sql.SQLException: ORA-12514: TNS:listener could not resolve SERVICE_NAME given in connect descriptor at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134) RECREATION STEPS: When a ORA-12514 error with SQL State is observed when the connection is created. One then tries to add this exception to the error map for the data source, this SQLException is not mapped to a StaleConnectionException. SEARCH KEYWORDS: Oracle ORA-12514 errormap dynamic error mapping StaleConnectionException I think they may have discovered a bug! I am in process of confirming my hypothesis, but it appears that custom mapping does not apply to initial creation of connections. I will also check to see if we should add the 66000 SQLState or the EC's 12514 and 12545 to the base Oracle PortabilityLayer.Local fix Problem summary **************************************************************** * USERS AFFECTED: All WebSphere Applciation Server users * * of Connection Pooling and mapping * * exceptions. * **************************************************************** * PROBLEM DESCRIPTION: When a customer maps a custom * * SQLException to StaleConnection or * * DUplicateKey, or removes a map for * * a specific Error Code or * * SQLState, it would not work in * * some cases. * **************************************************************** * RECOMMENDATION: * **************************************************************** In one path we were not calling the correct path to pick up custom exception maps.Problem conclusion All paths should now work for custom Exception mapping. The fix for this APAR will be available via iFix PQ97168Temporary fix Comments
APAR is sysrouted FROM one or more of the following: APAR is sysrouted TO one or more of the following: Modules/Macros
SRLS
|
Document Information |
Product categories: Software > Application Servers >
Distributed Application & Web Servers > WebSphere Application
Server > General
Operating system(s):
Software version: 400
Software edition:
Reference #: PQ97168
IBM Group: Software Group
Modified date: Dec 8, 2004
(C) Copyright IBM Corporation 2000, 2006. All Rights Reserved.