Subject FBSQLException: resultSet is closed with Jaybird 2.0
Author Carsten Schäfer
i got the following exception with one of my databases:
org.firebirdsql.jdbc.FBSQLException: The resultSet is closed
at org.firebirdsql.jdbc.FBResultSet.getField(FBResultSet.java:635)
at org.firebirdsql.jdbc.FBResultSet.getBoolean(FBResultSet.java:710)
at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.firebirdsql.pool.ResultSetHandler.invoke(ResultSetHandler.java:70)
at $Proxy2.getBoolean(Unknown Source)
at
com.TTC_Informatik.PAULA.general.Aufgabe.parseAufgabedaten(Aufgabe.java:636)

This only happens with Jaybird 2.0 (every time). If i replace the jar
with Jaybird 1.5.5 everything works fine.
For my configuration see my last messages.
I think it's a bug with the StatementPooling.
Here is the relevant part of my src:
635 this.setFiles(AufgabenFile.get_Files_Von(get_ID(),con));
636 this.setOhneSamstag(rs.getBoolean(F_OHNE_SAMSTAG));
637 this.setOhneSonntag(rs.getBoolean(F_OHNE_SONNTAG));

final public static ArrayList get_Files_Von(Long id, Connection con)
throws java.sql.SQLException {
PreparedStatement anfrage = con.prepareStatement(file_query);
anfrage.setLong(1,id.longValue());
ResultSet rs = anfrage.executeQuery();
ArrayList al = new ArrayList();
while (rs.next()) {
al.add(parse_File(rs));
}
rs.close();
anfrage.close();
return al;
}

The error happens everytime after the call of get_Files_Von().
(If i change the lines 635 and 636 the error happens in line 637)

mfg
Carsten