[hibernate-issues] [Hibernate-JIRA] Created: (HHH-7068) "Cursor state not valid" error from AS400

Alex Varakin (JIRA) noreply at atlassian.com
Wed Feb 15 00:04:10 EST 2012


"Cursor state not valid" error from AS400
-----------------------------------------

                 Key: HHH-7068
                 URL: https://hibernate.onjira.com/browse/HHH-7068
             Project: Hibernate ORM
          Issue Type: Bug
          Components: core
    Affects Versions: 4.0.0.Final
         Environment: -Hibernate version, shipped with AS 7.0.2 and 7.1.0RC1
-Database AS400
            Reporter: Alex Varakin


I am having a problem with an application which runs under AS 7.0.2 (7.1.0CR1 as well). It connects to database on AS400 using JPA interface and  is able to read data from table on AS400 starting from row 0, but if I specify starting row more than 0 using query.setFirstResult, then I am getting an exception while running the actual query:

 

Caused by: java.sql.SQLException: Cursor state not valid.

    at com.ibm.as400.access.JDError.createSQLExceptionSubClass(JDError.java:819)

    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:411)

    at com.ibm.as400.access.JDError.throwSQLException(JDError.java:387)

    at com.ibm.as400.access.AS400JDBCResultSet.beforePositioning(AS400JDBCResultSet.java:1282)

    at com.ibm.as400.access.AS400JDBCResultSet.absolute(AS400JDBCResultSet.java:1086)

    at org.jboss.jca.adapters.jdbc.WrappedResultSet.absolute(WrappedResultSet.java:131)

    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [:1.6.0_29]

    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [:1.6.0_29]

    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) [:1.6.0_29]

    at java.lang.reflect.Method.invoke(Method.java:597) [:1.6.0_29]

    at org.hibernate.engine.jdbc.internal.proxy.AbstractResultSetProxyHandler.continueInvocation(AbstractResultSetProxyHandler.java:104) [hibernate-core-4.0.0.Final.jar:4.0.0.Final]

 

Same code works fine under AS 7.0.2 and Hibernate 3.6.9.

I guess this is related to scrollable result set, it seems that Hibernate does not make result set as scrollable. 

 


--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list