mp******@forzani.com wrote:
Hello.
I have a curious problem.
Occasionally executing a simple select against an AS400 DB2 database
through JDBC fails with the following error: (SQLState = 57014) -
java.sql.SQLException: [SQL7962] Cursor CRSR0002 opened.
Does anyone know what might be causing this error?
SQLSTATE 57014 normally yields SQLCODE -952, which indicates some type
of abnormal end of processing (see below). SQL7962 is an info message
(not an error) and should not be related to SQLSTATE 57014.
Your best bet is probably examining the job log of the job associated
with the JDBC client (often a QSQSRVR or QZDASOINIT prestart job). Find
the SQL0952 message and look for any messages in the job log previous to
that. Often another message will explain the root cause.
wrkmsgd sql0952 qsqlmsg
Message ID . . . . . . . . . : SQL0952
Message file . . . . . . . . : QSQLMSG
Library . . . . . . . . . : QSYS
Message . . . . : Processing of the SQL statement ended. Reason code
&1.
Cause . . . . . : The SQL operation was ended before normal
completion. The
reason code is &1. Reason codes and their meanings are:
1 -- An SQLCancel API request has been processed, for example from
ODBC.
2 -- SQL processing was ended by sending an exception.
3 -- Abnormal termination.
4 -- Activation group termination.
5 -- Reclaim activation group or reclaim resources.
6 -- Process termination.
7 -- An EXIT function was called.
8 -- Unhandled exception.
9 -- A Long Jump was processed.
10 -- A cancel reply to an inquiry message was received.
11 -- Open Database File Exit Program (QIBM_QDB_OPEN).
0 -- Unknown cause.
Recovery . . . : If the reason code is 1, a client request was made
to cancel SQL processing. For all other reason codes, see previous
messages to determine why SQL processing was ended.
--
Karl Hanson