We're updating the issue view to help you get more done. 

Tests doing dynamic fetch scrolling a collection fail on DB2

Description

The following tests are failing on DB2:

org.hibernate.test.bytecode.enhancement.lazy.StatelessQueryScrollingTest.testDynamicFetchCollectionScroll
org.hibernate.test.stateless.fetching.StatelessSessionFetchingTest.testDynamicFetchCollectionScroll

Stacktrace:

org.hibernate.exception.GenericJDBCException: Could not determine if resultset is empty due to exception calling isBeforeFirst or isAfterLast()
at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:47)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:113)
at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:99)
at org.hibernate.internal.FetchingScrollableResultsImpl.isResultSetEmpty(FetchingScrollableResultsImpl.java:263)
at org.hibernate.internal.FetchingScrollableResultsImpl.next(FetchingScrollableResultsImpl.java:65)
at org.hibernate.test.stateless.fetching.StatelessSessionFetchingTest.testDynamicFetchCollectionScroll(StatelessSessionFetchingTest.java:228)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
at org.hibernate.testing.junit4.ExtendedFrameworkMethod.invokeExplosively(ExtendedFrameworkMethod.java:45)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:298)
at org.junit.internal.runners.statements.FailOnTimeout$CallableStatement.call(FailOnTimeout.java:292)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.lang.Thread.run(Thread.java:748)
Caused by: com.ibm.db2.jcc.am.SqlException: [jcc][t4][10179][10900][4.24.92] This method should only be called on ResultSet objects that are scrollable (type TYPE_SCROLL_SENSITIVE or TYPE_SCROLL_INSENSITIVE). ERRORCODE=-4476, SQLSTATE=null
at com.ibm.db2.jcc.am.b6.a(b6.java:794)
at com.ibm.db2.jcc.am.b6.a(b6.java:66)
at com.ibm.db2.jcc.am.b6.a(b6.java:133)
at com.ibm.db2.jcc.am.ResultSet.checkThatResultSetTypeIsScrollable(ResultSet.java:4790)
at com.ibm.db2.jcc.am.ResultSet.isBeforeFirst(ResultSet.java:2087)
at org.hibernate.internal.FetchingScrollableResultsImpl.isResultSetEmpty(FetchingScrollableResultsImpl.java:260)
... 17 more

Environment

None

Status

Assignee

Andrea Boriero

Reporter

Gail Badner

Fix versions

Labels

None

backPortable

None

Suitable for new contributors

None

Requires Release Note

None

Pull Request

None

backportDecision

None

Components

Affects versions

5.4.4

Priority

Major