PK06189: JAVA.SQL.SQLEXCEPTION:DB2JDBCSQLCOMPILER RECEIVED ERROR IN METHOD COMPILESQL ->INSERT/UPDATE/DELETE NOT HONORED.

 A fix is available

Obtain the fix for this APAR



APAR status
Closed as program error.

Error description
When using DB2 for zOS Local JDBC Provider(RRS), V5 environment
(V5 data source in a  J2EE1.3 environment) if the application
gets a connection and does a setReadOnly(true), readOnly on the
conn() never gets set back to the 'default' of 'false' when it
is put back into the free pool. Whoever uses this connection
from the pool next time if attempted to do an update throws an
exception since the conn()has readOnly=true with the following
error stack..
Caused by: java.sql.SQLException: DB2JDBCSQLCompiler Received
Error in  Method compileSQL -> Insert/Update/Delete not honored.
Database is readOnly
COM.ibm.db2os390.sqlj.jdbc.DB2JDBCSQLCompiler.compileSQL(DB2JDBC
SQLCompiler.java:205)
COM.ibm.db2os390.sqlj.jdbc.DB2JDBCSQLCompiler.compileSQL(DB2JDBC
SQLCompiler.java:100)
COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.prepareStatement
(DB2SQLJConnection.java:1454)
COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.prepareStatement
(DB2SQLJConnection.java:1583)
com.ibm.db2.jcc.DB2LogicalConnection.prepareStatement
(DB2LogicalConnection.java:518)
com.ibm.ws.rsadapter.cci.WSRdbConnectionImpl.getPreparedStatemen
(WSRdbConnectionImpl.java:902)
com.ibm.ws.rsadapter.cci.WSResourceAdapterBase.prepareStatement
(WSResourceAdapterBase.java:423)
Local fix Problem summary
****************************************************************
* USERS AFFECTED: All users of WebSphere Application Server    *
*                 V5.0 for z/OS                                *
****************************************************************
* PROBLEM DESCRIPTION: A connection incorrectly returned to    *
*                      pool with ReadOnly set to true causes   *
*                      SQLException: DB2JDBCSQLCompiler        *
*                      received error in Method compileSQL->   *
*                      Insert/Update/Delete not honored.       *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
In the case of a JDBC resource being used under a local
transaction with connection sharing, the ReadOnly attribute
associated with a managed connection may not be properly
reset to its default value setting before the connection
is returned to the connection pool. This can happen if
the application gets a connection handle to a connection,
does a setReadOnly(true) on the connection, uses
the connection, and then closes the connection handle.
At close, the connection will be returned to the shared pool
for subsequent reuse under the same transaction. When the
application now issues getConnection() again, a connection
handle to the  same connection will be returned to the
application with the ReadOnly attribute still appropriately
set to true, but a status indicator to remember that the
ReadOnly attribute was changed will incorrectly have been
reset by getConnection() processing. Thus, when the
application now closes the connection and the transaction
completes, connection cleanup processing will not detect that
the ReadOnly attribute was changed. As a result, it will
not reset the ReadOnly attribute to its original default
value of false. Later when the connection is reused from
the freepool, if the application attempts to do an update,
insert, or delete request on the database, the request
will fail with an SQLEXCEPTION since the connection
is still set to allow only read access.

The exception, which can be seen in the joblog of the
the application servant region, will look similar to the
following:

java.sql.SQLException: DB2JDBCSQLCompiler Received Error
  in Method compileSQL -> Insert/Update/Delete not honored.
at COM.ibm.db2os390.sqlj.jdbc.DB2JDBCSQLCompiler.
  compileSQL(DB2JDBCSQLCompiler.java:205)
at COM.ibm.db2os390.sqlj.jdbc.DB2JDBCSQLCompiler.
  compileSQL(DB2JDBCSQLCompiler.java:100)
at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.
  prepareStatement(DB2SQLJConnection.java:1454)
at COM.ibm.db2os390.sqlj.jdbc.DB2SQLJConnection.
  prepareStatement(DB2SQLJConnection.java:1583)
Problem conclusion
The WebSphere getConnection() processing was changed
to not reset the connection status indicator that indicates
if the ReadOnly property has been changed.

APAR PK06189 is associated with SERVICE LEVEL W502031 of
WebSphere Application Server V5.0 for z/OS.
Temporary fix Comments
APAR information
APAR number PK06189
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 2005-05-23
Closed date 2005-06-20
Last modified date 2005-07-01

APAR is sysrouted FROM one or more of the following:
PK06188

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 UK04679    UP05/06/28 P F506

  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: swg1PK06189.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 #: PK06189
IBM Group: Software Group
Modified date: Jul 1, 2005