[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] NPE in DatabaseCall.translate() when page size is set

Hi,

I have a base class (@Inheritance(strategy = InheritanceType.JOINED))
with a number of subclasses, all with string discriminator values.
When I rung the following query, I'm giving NPE exception: SELECT be
FROM BaseEntity be

If I do not set q.setFirstResult(0).setMaxResults(x) (x can be any
number > 0, even if the size is more than query result), it works
good, but as I set some maxResults, it throws the following exception.

[EL Warning]: 2008.08.09
09:06:16.315--UnitOfWork(10250203)--java.lang.NullPointerException
java.lang.NullPointerException
	at org.eclipse.persistence.internal.databaseaccess.DatabaseCall.translate(DatabaseCall.java:925)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:203)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeCall(DatasourceCallQueryMechanism.java:190)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.executeSelectCall(DatasourceCallQueryMechanism.java:261)
	at org.eclipse.persistence.internal.queries.DatasourceCallQueryMechanism.selectAllRows(DatasourceCallQueryMechanism.java:594)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRowsFromConcreteTable(ExpressionQueryMechanism.java:2496)
	at org.eclipse.persistence.descriptors.InheritancePolicy.selectAllRowUsingDefaultMultipleTableSubclassRead(InheritancePolicy.java:1265)
	at org.eclipse.persistence.descriptors.InheritancePolicy.selectAllRowUsingMultipleTableSubclassRead(InheritancePolicy.java:1299)
	at org.eclipse.persistence.internal.queries.ExpressionQueryMechanism.selectAllRows(ExpressionQueryMechanism.java:2461)
	at org.eclipse.persistence.queries.ReadAllQuery.executeObjectLevelReadQuery(ReadAllQuery.java:478)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:883)
	at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:666)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:844)
	at org.eclipse.persistence.queries.ReadAllQuery.execute(ReadAllQuery.java:456)
	at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:906)
	at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2588)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1178)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1162)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1136)
	at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1118)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:399)
	at org.eclipse.persistence.internal.jpa.EJBQueryImpl.getResultList(EJBQueryImpl.java:517)


Thanks,
Mohsen.