[
https://issues.apache.org/jira/browse/DERBY-4794?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Manoranjan Sahu updated DERBY-4794:
-----------------------------------
One of the scenario where I see the issue is when I use an JPA entity(A) which
has one to many mapping with other JPA entity(B).
When I try to A.Bcollections(), the derby's select fires and throws the
following error.
I am providing the part of exception which will be useful to you.
Equally severe exception raised during cleanup (ignored) null
java.lang.NullPointerException
at
org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRTS(Unknown
Source)
at
org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.finish(Unknown
Source)
at org.apache.derby.impl.sql.execute.BaseActivation.close(Unknown Source)
at
org.apache.derby.impl.sql.conn.GenericLanguageConnectionContext.cleanupOnError(Unknown
Source)
at
org.apache.derby.iapi.services.context.ContextManager.cleanupOnError(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.cleanupOnError(Unknown
Source)
at
org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
Source)
at
org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown
Source)
at
oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:726)
at
oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:501)
at
oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeCall(DatabaseAccessor.java:452)
at
oracle.toplink.essentials.threetier.ServerSession.executeCall(ServerSession.java:473)
at
oracle.toplink.essentials.internal.sessions.IsolatedClientSession.executeCall(IsolatedClientSession.java:152)
at
oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:228)
at
oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:214)
at
oracle.toplink.essentials.internal.queryframework.DatasourceCallQueryMechanism.selectOneRow(DatasourceCallQueryMechanism.java:635)
at
oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRowFromTable(ExpressionQueryMechanism.java:2453)
at
oracle.toplink.essentials.internal.queryframework.ExpressionQueryMechanism.selectOneRow(ExpressionQueryMechanism.java:2428)
at
oracle.toplink.essentials.queryframework.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:365)
at
oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:724)
at
oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
at
oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
at
oracle.toplink.essentials.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:1834)
at
oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
at
oracle.toplink.essentials.internal.indirection.NoIndirectionPolicy.valueFromQuery(NoIndirectionPolicy.java:250)
at
oracle.toplink.essentials.mappings.ForeignReferenceMapping.valueFromRowInternal(ForeignReferenceMapping.java:1001)
at
oracle.toplink.essentials.mappings.OneToOneMapping.valueFromRowInternal(OneToOneMapping.java:1065)
at
oracle.toplink.essentials.mappings.ForeignReferenceMapping.valueFromRow(ForeignReferenceMapping.java:938)
at
oracle.toplink.essentials.mappings.DatabaseMapping.readFromRowIntoObject(DatabaseMapping.java:1022)
at
oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildAttributesIntoObject(ObjectBuilder.java:281)
at
oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:530)
at
oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:389)
at
oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObjectsInto(ObjectBuilder.java:660)
at
oracle.toplink.essentials.internal.queryframework.DatabaseQueryMechanism.buildObjectsFromRows(DatabaseQueryMechanism.java:197)
at
oracle.toplink.essentials.queryframework.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:348)
at
oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:724)
at
oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
at
oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
at
oracle.toplink.essentials.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:1834)
at
oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
at
oracle.toplink.essentials.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:101)
at
oracle.toplink.essentials.internal.indirection.QueryBasedValueHolder.instantiate(QueryBasedValueHolder.java:91)
at
oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:105)
at
oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiateImpl(UnitOfWorkValueHolder.java:175)
at
oracle.toplink.essentials.internal.indirection.UnitOfWorkValueHolder.instantiate(UnitOfWorkValueHolder.java:247)
at
oracle.toplink.essentials.internal.indirection.DatabaseValueHolder.getValue(DatabaseValueHolder.java:105)
at
oracle.toplink.essentials.indirection.IndirectList.buildDelegate(IndirectList.java:208)
at
oracle.toplink.essentials.indirection.IndirectList.getDelegate(IndirectList.java:330)
at
oracle.toplink.essentials.indirection.IndirectList.size(IndirectList.java:655)
However this does not happen always.
Besides, Could you please suggest me the appropriate derby version I need to
use in production system.
I saw the following versions
----------------------
* 10.5.3.0 (August 21, 2009 / SVN 802917)
* 10.5.1.1 (April 28, 2009 / SVN 764942)
* 10.4.2.0 (September 5, 2008 / SVN 689064)
* 10.3.3.0 (May 12, 2008 / SVN 652961)
* 10.4.1.3 (April 24, 2008 / SVN 648739)
* 10.2.2.0 (Dec 12, 2006 / SVN 485682)
* 10.2.1.6 (Oct 02, 2006 / SVN 452058)
* 10.1.3.1 (Jun 30, 2006 / SVN 417277)
* 10.1.2.1 (Nov 18, 2005 / SVN 330608)
* 10.1.1.0 (Aug 3, 2005 / SVN 208786)
* ------------------------------------------------------------
I am not sure my version 561794 is too old(bad?) to use in production.
Any help is welcome.
PS:- I use toplink as my persistence provider.
> NPE at org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRTS
> ------------------------------------------------------------------------------
>
> Key: DERBY-4794
> URL: https://issues.apache.org/jira/browse/DERBY-4794
> Project: Derby
> Issue Type: Bug
> Components: Miscellaneous
> Environment: Derby version info -- as seen in MANIFEST.MF
> Manifest-Version: 1.0
> Ant-Version: Apache Ant 1.6.5
> Created-By: 1.4.2_12-b03 (Sun Microsystems Inc.)
> Bundle-Vendor: Apache Software Foundation
> Bundle-Name: Apache Derby 10.3
> Bundle-Version: 10.3.1000004.561794
> Sealed: true
> Reporter: Manoranjan Sahu
>
> Derby is throwing NPE randomly while executing simple sql statements.
> Stack trace in derby.log
> Caused by: java.sql.SQLException: Java exception: ':
> java.lang.NullPointerException'.
> at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source)
> at org.apache.derby.impl.jdbc.Util.javaException(Unknown Source)
> at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown
> Source)
> at
> org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown
> Source)
> at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown
> Source)
> at
> org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeQuery(Unknown Source)
> at
> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.executeSelect(DatabaseAccessor.java:726)
> at
> oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.basicExecuteCall(DatabaseAccessor.java:501)
> ... 58 more
> Caused by: java.sql.SQLException: Java exception: ':
> java.lang.NullPointerException'.
> at
> org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> at
> org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown
> Source)
> ... 70 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.derby.impl.sql.execute.BasicNoPutResultSetImpl.finishAndRTS(Unknown
> Source)
> at
> org.apache.derby.impl.sql.execute.ProjectRestrictResultSet.finish(Unknown
> Source)
> at org.apache.derby.impl.sql.execute.BaseActivation.close(Unknown
> Source)
> at org.apache.derby.impl.sql.GenericActivationHolder.execute(Unknown
> Source)
> at org.apache.derby.impl.sql.GenericPreparedStatement.execute(Unknown
> Source)
> ... 63 more
> It is noticed that this issue is happening randomly , during selects and
> inserts. I did not find any quick reproduction steps for it.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.