I am running JTOpen inside of Websphere 3.5.x
JDBC auto-commit is enabled.
When running JDBC queries, I am observing intermittent SQL
exceptions.
The message that I see is "Cursor state not valid."
What is the cause of "Cursor state not valid."?
Is there a workaround?
Here is the stack trace:
java.sql.SQLException: Cursor state not valid.
at com.ibm.as400.access.JDError.throwSQLException(JDError.java:360)
at
com.ibm.as400.access.AS400JDBCResultSet.checkOpen(AS400JDBCResultSet.java:35
6)
at
com.ibm.as400.access.AS400JDBCResultSet.beforePositioning(AS400JDBCResultSet
.java:1157)
at
com.ibm.as400.access.AS400JDBCResultSet.next(AS400JDBCResultSet.java:1680)
at foobar.AddressData_Peer.createObjects(AddressData_Peer.java:54)
it looks like a missing call to next() of the resultSet.
Dieter
Anonymous wrote:
--
Dieter Bender
what's your code you are running?
did you have a look to the joblog of the server job? you'll will find it
easy with
wrkobjlck xxx *usrprf
where xxx is the name of the user of the connection.
Dieter
Anonymous wrote:
--
Dieter Bender
Here is how I did it:
I discovered that my homegrown JDBC connection pool was not thread safe. It
turned out that multiple threads were simultaneously using a
java.sql.Connection object.
I cleaned up the threading issue. My app can now run SELECT statements
without a hitch.