PQ91121: JAVA.LANG.SQLEXCEPTION PARAMETER WITH INDEX 1 IS NOT SET OCCURS USING PREPARED STATEMENTS AND PREPARED STATEMENT CACHING ENABLED

 A fix is available

Obtain the fix for this APAR



APAR status
Closed as program error.

Error description
Customer is using a DB2 JDBC driver and is getting error
java.lang.sqlexception parameter with index 1 is not set.
The customer verified the prepared statement and set
methods were correct.
Local fix
A workaround for this problem is to disable Prepared Statement
Caching, although this workaround does have performance
implications.
Problem summary
****************************************************************
* USERS AFFECTED: All users of WebSphere Application Server    *
*                 V5.0 for z/OS                                *
****************************************************************
* PROBLEM DESCRIPTION: SQLException with message "Parameter    *
*                      with index of 1 is not set." when using *
*                      batch execution with Prepared           *
*                      Statements.  The actual number of the   *
*                      index may vary.                         *
****************************************************************
* RECOMMENDATION:                                              *
****************************************************************
When the executeBatch() method of a PreparedStatement object is
called before using the addBatch() method to add the actual
Statements that will be executed, WebSphere throws an
SQLException indicating that a parameter is not set.  Although
the java.sql.PreparedStatement API is not clear as to what
should be done, some JDBC drivers may allow this and treat it as
a no-op.  WebSphere's SQLException is preventing the driver
specific behavior from taking effect.

This problem can be seen as an SQLException in the joblog of the
application servant region that looks similar to the following:

SQLException(1): sqlcode=0 sqlstate=null message=Parameter with
  index of 1 is not set.
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.
  enforceStatementProperties(WSJdbcPreparedStatement.java
Problem conclusion
WebSphere's parameter tracking has been removed, so enforcement
of parameter setting is now handled by the JDBC driver which may
choose to treat a zero statement batch execution as a no-op.

APAR PQ91121 is associated with SERVICE LEVEL W502014 of
WebSphere Application Server V5.0 for z/OS.
Temporary fix Comments
APAR information
APAR number PQ91121
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 2004-07-08
Closed date 2004-08-05
Last modified date 2004-09-03

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

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 UQ91441    UP04/08/23 P F408

  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: swg1PQ91121.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 #: PQ91121
IBM Group: Software Group
Modified date: Sep 3, 2004