TopLink 12.1.2 (EclipseLink 2.4.2): JPQL-Query As Streamed-Cursor Throws NullPointerException (Doc ID 1941090.1)

Last updated on JULY 13, 2015

Applies to:

Oracle TopLink - Version 12.1.2.0.0 and later
Information in this document applies to any platform.

Symptoms

The problem with EclipseLink 2.4.2 (TopLink 12.1.2) is that the combination of a streamed cursor with a JPQL-
Query (with constructor) throws the following NullPointerException (abbreviated):

java.lang.NullPointerException
at java.util.ArrayList.(ArrayList.java:131)
at org.eclipse.persistence.queries.ReportQueryResult.processItem(ReportQueryResult.java:162)
at org.eclipse.persistence.queries.ReportQueryResult.buildResult(ReportQueryResult.java:109)
at org.eclipse.persistence.queries.ReportQueryResult.(ReportQueryResult.java:78)
at org.eclipse.persistence.queries.ReportQuery.buildObject(ReportQuery.java:593)
at org.eclipse.persistence.queries.ReportQuery.buildObject(ReportQuery.java:585)
at org.eclipse.persistence.queries.Cursor.buildAndRegisterObject(Cursor.java:310)
at org.eclipse.persistence.queries.CursoredStream.retrieveNextObject(CursoredStream.java:425)
at org.eclipse.persistence.queries.CursoredStream.setLimits(CursoredStream.java:462)
at org.eclipse.persistence.queries.CursoredStream.(CursoredStream.java:58)
at org.eclipse.persistence.queries.CursoredStreamPolicy.execute(CursoredStreamPolicy.java:67)
at org.eclipse.persistence.queries.ReportQuery.executeDatabaseQuery(ReportQuery.java:836)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:852)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1111)
at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:393)
at org.eclipse.persistence.internal.sessions.AbstractSession.internalExecuteQuery(AbstractSession.java:2977)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1607)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1589)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1197)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2879)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1607)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1589)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1554)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:231)
at org.eclipse.persistence.internal.jpa.QueryImpl.getSingleResult(QueryImpl.java:442)
at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:382)
at de.arbeitsagentur.allegro.batchframework.util.AbstractQueryReader.open(AbstractQueryReader.java:140)
...



Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms