APAR status
Closed as program error.
Error description
Calling Sybase stored procedure (via Callable statement) the
second time resulted in the following exceptions:
- com.sybase.jdbc2.jdbc.SybSQLException: Execute cursor
'jconnect_implicit_405' is declared on a procedure which has
more than one SQL statment. For the declaration of this cursor
to be legal the procedure should have a single SELECT statement
clause.
- com.sybase.jdbc2.jdbc.SybSQLException: Execute cursor
'jconnect_implicit_410' is declared on a procedure which
contains a non-SELECT or a SELECT with a COMPUTE clause. For the
declaration of this cursor to be legal it should have a single
SELECT statement without a COMPUTE clause.
.
The above 2 exceptions are corresponding to Sybase SQLState
ZZZZZ SQLCode 7721 & SQLState ZZZZZ SQLCode 7773 respectively.
.
Later on, the following exception may occur:
java.sql.SQLException: JZ00F: Cursor property cannot be changed
after the cursor has been declared.
.
The same stored procedure works fine using WebSphere 4.0
or WebSphere 5.0 with 4.0 data source style.
Local fix
The SybaseDataStoreHelper class has the doStatementCleanup
method with the following:
stmt.setCursorName(null);
stmt.setEscapeProcessing(true);
stmt.setFetchDirection(ResultSet.FETCH_FORWARD);
if (stmt.getMaxFieldSize() != 0)
stmt.setMaxFieldSize(0);
if (stmt.getMaxRows() != 0)
stmt.setMaxRows(0);
stmt.setQueryTimeout(0);
.
The setCursorName(null) to reset the cursor after use
(as WebSphere 5.0 supports Callable statement cache) does not
supported by Sybase.
.
Problem summary
****************************************************************
* USERS AFFECTED: WebSphere Application Server 5.x users *
* using Sybase Stored Procedures which *
* 1) return both a result set and a value or *
* 2) use the setQueryTimeout method. *
****************************************************************
* PROBLEM DESCRIPTION: The second time the Stored Procedure *
* is executed by the application, an *
* exception is thrown by Sybase stating: *
* *
* com.sybase.jdbc2.jdbc.SybSQLException: *
* Execute cursor 'jconnect_implicit_410' *
* is declared on a procedure which *
* contains a non-SELECT or a SELECT with *
* a COMPUTE clause. For the declaration *
* of this cursor to be legal it should *
* have a single SELECT statement *
* without a COMPUTE clause. *
****************************************************************
* RECOMMENDATION: *
****************************************************************
Because of a problem with the code for resetting statements
before putting them in the statement cache for reuse, a
small percentage of statements fail with the listed exception.
In working with Sybase, it was determined that the offending
reset statement could be removed completely.
Problem conclusion
Removed the offending call to setCursorName(null) to allow
all cached statements to function properly.
Temporary fix Comments
APAR information |
APAR number |
PQ83999 |
Reported component name |
WAS NETWRK DEPL |
Reported component ID |
5630A3601 |
Reported release |
00A |
Status |
CLOSED PER |
PE |
NoPE |
HIPER |
NoHIPER |
Special Attention |
NoSpecatt |
Submitted date |
2004-01-30 |
Closed date |
2004-02-13 |
Last modified date |
2004-02-13 |
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Modules/Macros
Publications Referenced
Applicable component levels |
R00A PSY |
UP |
R00H PSY |
UP |
R00I PSY |
UP |
R00P PSY |
UP |
R00S PSY |
UP |
R00W PSY |
UP |
|