Issue Details (XML | Word | Printable)

Key: JDBC-469
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Mark Rotteveel
Reporter: Mark Rotteveel
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Jaybird JCA/JDBC Driver

NullPointerException when closing `getMetaData` an a (closed) result set of a (closed) connection

Created: 21/Dec/16 01:35 PM   Updated: 05/Mar/17 12:59 PM
Component/s: JDBC driver
Affects Version/s: Jaybird 2.2.9, Jaybird 2.2.10, Jaybird 2.2.11, Jaybird 2.2.12, Jaybird 3.0.0-alpha-1, Jaybird 3.0.0-beta-1, Jaybird 3.0.0-beta-2
Fix Version/s: Jaybird 3.0.0-beta-3, Jaybird 2.2.13, Jaybird 3.0.0


 Description  « Hide
When calling `ResultSet.getMetaData()` on a (closed) result set of a (closed) connection a NPE can occur. Instead it should throw an exception that the result set is closed.

Exception below is in 2.2.12, Jaybird 3 has a similar problem, but it does not throw an NullPointerException.

java.lang .NullPointerException
    at org.firebirdsql.jdbc.AbstractConnection.getDatabaseParameterBuffer(AbstractConnection.java:224)
    at org.firebirdsql.jdbc.FBResultSetMetaData.<init>(FBResultSetMetaData.java:61)
    at org.firebirdsql.jdbc.AbstractResultSet.getMetaData(AbstractResultSet.java:1025)
    at com.borland.dx.sql.dataset.RuntimeMetaData.a(Unknown Source)
    at com.borland.dx.sql.dataset.JdbcProvider.b(Unknown Source)
    at com.borland.dx.sql.dataset.JdbcProvider.provideData(Unknown Source)
    at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
    at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)

Exception in Jaybird 3.0.0-beta-2 is:

java.sql.SQLException: no transaction for request [SQLState:25000, ISC error code:335544363]
at org.firebirdsql.gds.ng.FbExceptionBuilder$Type$1.createSQLException(FbExceptionBuilder.java:498)
at org.firebirdsql.gds.ng.FbExceptionBuilder$ExceptionInformation.toSQLException(FbExceptionBuilder.java:454)
at org.firebirdsql.gds.ng.FbExceptionBuilder.toSQLException(FbExceptionBuilder.java:218)
at org.firebirdsql.jdbc.FBConnection.getGDSHelper(FBConnection.java:1433)
at org.firebirdsql.jdbc.FBResultSetMetaData.isColumnLabelForName(FBResultSetMetaData.java:75)
at org.firebirdsql.jdbc.FBResultSetMetaData.<init>(FBResultSetMetaData.java:64)
at org.firebirdsql.jdbc.AbstractResultSet.getMetaData(AbstractResultSet.java:1098)

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no subversion log entries for this issue yet.