"Cursor state not valid.", AS400 JDBC, IBM JTOpen 3.0
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Sean_Sullivan
Posted On:   Wednesday, April 17, 2002 01:24 PM

I am using JT400.JAR from IBM's JTOpen 3.0 release. 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.j   More>>


I am using JT400.JAR from IBM's JTOpen 3.0 release.



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:356)
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)

   <<Less

Re: "Cursor state not valid.", AS400 JDBC, IBM JTOpen 3.0

Posted By:   Sean_Sullivan  
Posted On:   Sunday, April 28, 2002 02:10 PM

I resolved the "Cursor state not valid" message.




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.
About | Sitemap | Contact