You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by "Knut Anders Hatlen (JIRA)" <ji...@apache.org> on 2014/09/02 14:27:21 UTC
[jira] [Updated] (DERBY-6724) NPE if insert statement needs
recompilation after having fired a trigger
[ https://issues.apache.org/jira/browse/DERBY-6724?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Knut Anders Hatlen updated DERBY-6724:
--------------------------------------
Attachment: Derby6724.java
The attached Java class [^Derby6724.java] reproduces the NPE reliably in my environment. Full stack trace:
{noformat}
Exception in thread "main" java.sql.SQLException: Java exception: ': java.lang.NullPointerException'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:107)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:133)
at org.apache.derby.impl.jdbc.Util.seeNextException(Util.java:255)
at org.apache.derby.impl.jdbc.Util.javaException(Util.java:277)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(TransactionResourceImpl.java:437)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(TransactionResourceImpl.java:353)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(EmbedConnection.java:2396)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(ConnectionChild.java:82)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1430)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1709)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1394)
at Derby6724.main(Derby6724.java:23)
Caused by: ERROR XJ001: Java exception: ': java.lang.NullPointerException'.
at org.apache.derby.iapi.error.StandardException.newException(StandardException.java:290)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.wrapArgsForTransportAcrossDRDA(SQLExceptionFactory.java:162)
at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(SQLExceptionFactory.java:73)
... 11 more
Caused by: java.lang.NullPointerException
at org.apache.derby.impl.sql.execute.InternalTriggerExecutionContext.cleanup(InternalTriggerExecutionContext.java:236)
at org.apache.derby.impl.sql.execute.TriggerEventActivator.cleanup(TriggerEventActivator.java:291)
at org.apache.derby.impl.sql.execute.InsertResultSet.cleanUp(InsertResultSet.java:2199)
at org.apache.derby.impl.sql.conn.GenericStatementContext.cleanupOnError(GenericStatementContext.java:543)
at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:476)
at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1337)
... 3 more
{noformat}
> NPE if insert statement needs recompilation after having fired a trigger
> ------------------------------------------------------------------------
>
> Key: DERBY-6724
> URL: https://issues.apache.org/jira/browse/DERBY-6724
> Project: Derby
> Issue Type: Bug
> Components: SQL
> Affects Versions: 10.11.1.1
> Reporter: Knut Anders Hatlen
> Attachments: Derby6724.java
>
>
> If an insert statement that has fired a trigger, is needs recompilation during execution, it fails with a NullPointerException in InternalTriggerExecutionContext.cleanup():
> {noformat}
> java.lang.NullPointerException
> at org.apache.derby.impl.sql.execute.InternalTriggerExecutionContext.cleanup(InternalTriggerExecutionContext.java:236)
> at org.apache.derby.impl.sql.execute.TriggerEventActivator.cleanup(TriggerEventActivator.java:291)
> at org.apache.derby.impl.sql.execute.InsertResultSet.cleanUp(InsertResultSet.java:2199)
> at org.apache.derby.impl.sql.conn.GenericStatementContext.cleanupOnError(GenericStatementContext.java:543)
> at org.apache.derby.impl.sql.GenericPreparedStatement.executeStmt(GenericPreparedStatement.java:476)
> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(GenericPreparedStatement.java:349)
> at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(EmbedStatement.java:1337)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(EmbedPreparedStatement.java:1709)
> at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(EmbedPreparedStatement.java:1394)
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)