Subject Re: [Firebird-Java] using Hibernate stream with Jaybird 3.0.5 I receive error
Author Gabor Dolla
Hi

So it was my fault, I had to define the transaction boundaries and then it started to work.

Sorry for the noise.

Regards

Gabor

On Wed, Sep 19, 2018 at 6:05 PM Mark Rotteveel mark@... [Firebird-Java] <Firebird-Java@yahoogroups.com> wrote:
 

On 19-9-2018 10:21, Gabor Dolla agdolla@... [Firebird-Java] wrote:
> 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(AbstractResultSet.java:287)
> ~[jaybird-jdk18-3.0.5.jar:3.0.5-JDK_1.8 (build: tag=v3.0.5
> date=201809071640)]
[..]
>
> java code which causes this error:
> Stream<X> mystream = session.createQuery("from X", X..class).stream();
> long count = mystream.count();
> mystream.close();
>
> I do not want to use the stream for counting :) I just want to show the
> problem, any other collect causes this problem.

I have tried a number of things, but I can't reproduce this. Could you
provide a project that reproduces this?

Mark
--
Mark Rotteveel