My Oracle Support Banner

Query Failed To Prepare Due To NPE Using Eclipselink 2.3.1 (Doc ID 2154047.1)

Last updated on AUGUST 28, 2020

Applies to:

Oracle TopLink - Version 11.1.1.6.0 to 12.1.1.0 [Release Oracle11g to 12c]
Information in this document applies to any platform.

Symptoms

Following exception is seen with EclipseLink when user load is high:

Exception [EclipseLink-6168] (Eclipse Persistence Services - 2.3.1.v20111018-r10243): org.eclipse.persistence.exceptions.QueryException
Exception Description: Query failed to prepare, unexpected error occurred: [java.lang.NullPointerException].
Internal Exception: java.lang.NullPointerException
Query: ReadAllQuery(name="<QUERYNAME>referenceClass=employee sql="SELECT <25 columns > FROM Employee t0, project t1 WHERE (((((t0.id = ?) AND (t0.id = t1.id)) AND (t1.projectid = ?)) AND (t1.startdate= ?)) AND (t1.enddate = ?))")
  at org.eclipse.persistence.exceptions.QueryException.prepareFailed(QueryException.java:1555)
  at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:625)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.checkPrepare(ObjectLevelReadQuery.java:823)
  at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:575)
  at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:812)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1040)
  at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:392)
  at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1128)
  at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2871)
  at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1516)
  at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1498)
  at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1463)
  at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:485)
  at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:742)
::::::::::::::
Caused by: java.lang.NullPointerException
 at org.eclipse.persistence.internal.expressions.DataExpression.copyCollection(DataExpression.java:132)
 at org.eclipse.persistence.internal.expressions.ObjectExpression.postCopyIn(ObjectExpression.java:470)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.ExpressionBuilder.registerIn(ExpressionBuilder.java:350)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.expressions.BaseExpression.postCopyIn(BaseExpression.java:63)
 at org.eclipse.persistence.internal.expressions.DataExpression.postCopyIn(DataExpression.java:350)
 at org.eclipse.persistence.internal.expressions.ObjectExpression.postCopyIn(ObjectExpression.java:469)
 at org.eclipse.persistence.internal.expressions.QueryKeyExpression.postCopyIn(QueryKeyExpression.java:245)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.expressions.CompoundExpression.postCopyIn(CompoundExpression.java:263)
 at org.eclipse.persistence.expressions.Expression.registerIn(Expression.java:3597)
 at org.eclipse.persistence.expressions.Expression.copiedVersionFrom(Expression.java:966)
 at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildBaseSelectionCriteria(ExpressionQueryMechanism.java:133)
 at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildBaseSelectStatement(ExpressionQueryMechanism.java:198)
 at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildBaseSelectStatement(ExpressionQueryMechanism.java:185)
 at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.buildNormalSelectStatement(ExpressionQueryMechanism.java:501)
 at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.prepareSelectAllRows(ExpressionQueryMechanism.java:1616)
 at org.eclipse.persistence.queries.ReadAllQuery.prepareSelectAllRows(ReadAllQuery.java:707)
 at org.eclipse.persistence.queries.ReadAllQuery.prepare(ReadAllQuery.java:644)
 at org.eclipse.persistence.queries.DatabaseQuery.checkPrepare(DatabaseQuery.java:613)
 ... 156 more



Analysis
It is a multi-threaded application.


Environment
Eclipse Persistence Services - 2.3.1.v20111018-r10243
TopLink 11.1.1.6.0
Linux x86-64 RHEL 5
WebLogic 10.3.6

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.