PQ97168: ORA-12545 WITH SQLSTATE 66000 COULD NOT BE MAPPED TO A STALECONNECTIONEXCEPTION EVEN USING CUSTOM MAPPING

 Fixes are available

6.0.2: WebSphere Application Server V6.0 Refresh Pack 2 for Windows platforms
5.0.2.12: WebSphere Application Server 5.0.2 Cumulative Fix 12
6.0.2: WebSphere Application Server V6.0 Refresh Pack 2 for HP-UX platforms
6.0.2: WebSphere Application Server V6.0 Refresh Pack 2 for AIX platforms
6.0.2: WebSphere Application Server V6.0 Refresh Pack 2 for Linux platforms
6.0.2: WebSphere Application Server V6.0 Refresh Pack 2 for Solaris platforms
6.0.2: WebSphere Application Server V6.0 Refresh Pack 2 for OS/400 platforms
5.1.1.6: WebSphere Application Server Version 5.1.1 Cumulative Fix 6
5.0.2.13: WebSphere Application Server 5.0.2 Cumulative Fix 13
5.1.1.7: WebSphere Application Server Version 5.1.1 Cumulative Fix 7
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for AIX
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Solaris
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for HP-UX
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Windows
5.0.2.14: WebSphere Application Server 5.0.2 Cumulative Fix 14 for Linux
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for AIX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Windows
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Solaris
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for HP-UX
5.1.1.8: WebSphere Application Server 5.1.1 Cumulative Fix 8 for Linux
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Windows
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Solaris
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for AIX
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for Linux
5.0.2.15: WebSphere Application Server 5.0.2 Cumulative Fix 15 for HP-UX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for HP-UX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for AIX
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Solaris
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Windows
5.1.1.9: WebSphere Application Server V5.1.1 Cumulative Fix 9 for Linux
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for AIX
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for HP-UX
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Linux
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Windows
5.0.2.16: WebSphere Application Server 5.0.2 Cumulative Fix 16 for Solaris
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for HP-UX
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for AIX
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Solaris
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Windows
5.1.1.10: WebSphere Application Server V5.1.1 Cumulative Fix 10 for Linux
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Windows
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Solaris
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for HP-UX
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for Linux
5.0.2.17: WebSphere Application Server 5.0.2 Cumulative Fix 17 for AIX



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 PQ97168
Temporary fix Comments
APAR information
APAR number PQ97168
Reported component name WEBSPHERE AE SO
Reported component ID 5630A2202
Reported release 400
Status CLOSED PER
PE NoPE
HIPER NoHIPER
Submitted date 2004-11-12
Closed date 2004-12-08
Last modified date 2004-12-08

APAR is sysrouted FROM one or more of the following:

APAR is sysrouted TO one or more of the following:

Modules/Macros
JDBCCM          

SRLS

Fix information

Applicable component levels
R400 PSY    UP


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