Subject using Hibernate stream with Jaybird 3.0.5 I receive error
Author Gabor Dolla

I use:
java 1.8
spring boot 2.0.5 with hibernate 5.2.17
jaybird 3.0.5
firebird server: WI-V2.5.7.27050 Firebird 2.5

I have defaultResultSetHoldable=true in the connect string

a simple stream query causes this error:

java.sql.SQLException: The result set is closed
    at org.firebirdsql.jdbc.AbstractResultSet.checkOpen( ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
    at org.firebirdsql.jdbc.AbstractResultSet.checkCursorMove( ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
    at ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5 date=201809071640)]
    at ~[HikariCP-2.7.9.jar:na]
    at ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at org.hibernate.query.internal.ScrollableResultsIterator.hasNext( ~[hibernate-core-5.2.17.Final.jar:5.2.17.Final]
    at java.util.Iterator.forEachRemaining( ~[na:1.8.0_181]
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining( ~[na:1.8.0_181]
    at ~[na:1.8.0_181]
    at ~[na:1.8.0_181]
    at$ReduceOp.evaluateSequential( ~[na:1.8.0_181]
    at ~[na:1.8.0_181]
    at ~[na:1.8.0_181]
    at ~[na:1.8.0_181]
    at ~[na:1.8.0_181]

java code which causes this error:
Stream<X> mystream = session.createQuery("from X", X.class).stream();
long count = mystream.count();

I do not want to use the stream for counting :) I just want to show the problem, any other collect causes this problem.