Matthew Kosem (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63ea554...
) *created* an issue
Hibernate ORM (
https://hibernate.atlassian.net/browse/HHH?atlOrigin=eyJpIjoiNDUzNDYxZDY3...
) / Bug (
https://hibernate.atlassian.net/browse/HHH-16178?atlOrigin=eyJpIjoiNDUzND...
) HHH-16178 (
https://hibernate.atlassian.net/browse/HHH-16178?atlOrigin=eyJpIjoiNDUzND...
) "could not advance using next()" occurs when streaming scrollable results with
non-nullable/non-updatable children (
https://hibernate.atlassian.net/browse/HHH-16178?atlOrigin=eyJpIjoiNDUzND...
)
Issue Type: Bug Affects Versions: 5.6.15 Assignee: Unassigned Attachments: test.zip
Components: hibernate-core Created: 13/Feb/2023 07:31 AM Environment: Hibernate 5.6.x +
JDK 11 and 17 Priority: Major Reporter: Matthew Kosem (
https://hibernate.atlassian.net/secure/ViewProfile.jspa?accountId=63ea554...
)
When upgrading from Hibernate 5.4.x to 5.6.x, our ability to stream resources with certain
relationship scenarios stopped working. The attached minimal test case recreates the
scenario.
The exception is:
Exception in thread "main" org.hibernate.exception.GenericJDBCException: could
not advance using next()
at
org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
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.ScrollableResultsImpl.convert(ScrollableResultsImpl.java:71)
at org.hibernate.internal.ScrollableResultsImpl.next(ScrollableResultsImpl.java:106)
at
org.hibernate.query.internal.ScrollableResultsIterator.hasNext(ScrollableResultsIterator.java:33)
at java.base/java.util.Iterator.forEachRemaining(Iterator.java:132)
at
java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801)
at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
at org.hibernate.query.spi.StreamDecorator.forEach(StreamDecorator.java:153)
at tst.oth.Test.main(Test.java:19)
Caused by: java.sql.SQLException: invalid cursor state: identified cursor is not open
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source)
at org.hsqldb.jdbc.JDBCResultSet.checkClosed(Unknown Source)
at org.hsqldb.jdbc.JDBCResultSet.next(Unknown Source)
at org.hibernate.internal.ScrollableResultsImpl.next(ScrollableResultsImpl.java:101)
... 6 more
Caused by: org.hsqldb.HsqlException: invalid cursor state: identified cursor is not open
at org.hsqldb.error.Error.error(Unknown Source)
at org.hsqldb.error.Error.error(Unknown Source)
... 10 more
(
https://hibernate.atlassian.net/browse/HHH-16178#add-comment?atlOrigin=ey...
) Add Comment (
https://hibernate.atlassian.net/browse/HHH-16178#add-comment?atlOrigin=ey...
)
Get Jira notifications on your phone! Download the Jira Cloud app for Android (
https://play.google.com/store/apps/details?id=com.atlassian.android.jira....
) or iOS (
https://itunes.apple.com/app/apple-store/id1006972087?pt=696495&ct=Em...
) This message was sent by Atlassian Jira (v1001.0.0-SNAPSHOT#100215- sha1:b88b0a4 )