You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The JPQL query SELECT o FROM Account o WHERE (o.accountId=?1) fails when supplied with an AccountId that is an embeddable id for the entity.
EclipseLink converts this to SQL: SELECT BALANCE, BANKNAME, CHECKING, OWNER, ACCOUNTNUM, ROUTINGNUM FROM WLPAccount WHERE ((ACCOUNTNUM = ?) AND (ROUTINGNUM = ?))
which looks fine, but it gets an error processing the result: NullPointerException: Cannot read field "index" because "key" is null.
Caused by: jakarta.persistence.PersistenceException: java.lang.NullPointerException: Cannot read field "index" because "key" is null
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:494)
at io.openliberty.data.internal.persistence.RepositoryImpl.invoke(RepositoryImpl.java:2570)
Caused by: java.lang.NullPointerException: Cannot read field "index" because "key" is null
at org.eclipse.persistence.internal.sessions.ArrayRecord.get(ArrayRecord.java:139)
at org.eclipse.persistence.descriptors.InheritancePolicy.classFromRow(InheritancePolicy.java:365)
at org.eclipse.persistence.mappings.AggregateObjectMapping.buildAggregateFromRow(AggregateObjectMapping.java:440)
at org.eclipse.persistence.mappings.AggregateObjectMapping.buildCloneFromRow(AggregateObjectMapping.java:786)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildAttributesIntoWorkingCopyClone(ObjectBuilder.java:2111)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildWorkingCopyCloneFromRow(ObjectBuilder.java:2364)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInUnitOfWork(ObjectBuilder.java:958)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObjectInternal(ObjectBuilder.java:844)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:799)
at org.eclipse.persistence.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:777)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.buildObject(ObjectLevelReadQuery.java:863)
at org.eclipse.persistence.queries.ReadObjectQuery.registerResultInUnitOfWork(ReadObjectQuery.java:896)
at org.eclipse.persistence.queries.ReadObjectQuery.executeObjectLevelReadQuery(ReadObjectQuery.java:570)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeDatabaseQuery(ObjectLevelReadQuery.java:1236)
at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:913)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:1195)
at org.eclipse.persistence.queries.ReadObjectQuery.execute(ReadObjectQuery.java:448)
at org.eclipse.persistence.queries.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:1283)
at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:3025)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1841)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1823)
at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1788)
at org.eclipse.persistence.internal.jpa.QueryImpl.executeReadQuery(QueryImpl.java:263)
at org.eclipse.persistence.internal.jpa.QueryImpl.getResultList(QueryImpl.java:475)
The text was updated successfully, but these errors were encountered:
Describe the bug
The JPQL query
SELECT o FROM Account o WHERE (o.accountId=?1)
fails when supplied with anAccountId
that is an embeddable id for the entity.EclipseLink converts this to SQL:
SELECT BALANCE, BANKNAME, CHECKING, OWNER, ACCOUNTNUM, ROUTINGNUM FROM WLPAccount WHERE ((ACCOUNTNUM = ?) AND (ROUTINGNUM = ?))
which looks fine, but it gets an error processing the result:
NullPointerException: Cannot read field "index" because "key" is null.
The text was updated successfully, but these errors were encountered: