Subject Re: [Firebird-Java] NullPointerException comming from org.firebirdsql.jdbc.AbstractPreparedStatement
Author Mark Rotteveel
Roman Rokytskyy wrote:
> Mark Rotteveel wrote:
>> Roman Rokytskyy wrote:
>>>> Can anyone shed any light or direction on this issue.
>>> Strange... the NPE can happen only if the prepared statement was closed
>>> before...
>>> Do you have / can you prepare a small test case to reproduce the issue.
>> Could also be a combination of a bug in hibernate 2 (which is rather
>> old) with Jaybird.
>> But I'd say Jaybird should throw SQLException here if it is called on a
>> closed statement (according to the Java 6 API), and not a NPE.
> Yes, and under normal conditions it does this (there are appropriate
> checks there). But the NPE can happen there when either fixedStmt or
> fixedStmt.getInSqlda() is null. There is only one place where fixedStmt
> is assigned to null - in a close method of its superclass. But there are
> appropriate checks in the AbstractPreparedStatement. So, this is
> definitely combination of Hibernate and Jaybird, but I would be very
> interested to find out how it was possible.

Well, if an old Hibernate version is used, chances are high they also
use an old Jaybird driver.

Grant, could you - next to the testcase Roman requested - specify the
exact software versions you use (of Java, Hibernate and Jaybird)?

Mark Rotteveel