Subject | Re: [Firebird-Java] NullPointerException comming from org.firebirdsql.jdbc.AbstractPreparedStatement |
---|---|
Author | Roman Rokytskyy |
Post date | 2009-04-20T19:05:10Z |
Mark Rotteveel wrote:
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.
Roman
> Roman Rokytskyy wrote:Yes, and under normal conditions it does this (there are appropriate
>>> 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.
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.
Roman