ArrayIndexOutOfRange Exception Thrown From GlassFish's TopLink Essentials JPA Implementation (Doc ID 1280223.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle GlassFish Server - Version 2.0 to 2.1.1 [Release 2.0 to 2.1]
Oracle GlassFish Server - Version 3.0 to 3.0.1 [Release 3.0]
Information in this document applies to any platform.
***Checked for relevance on 06-Sep-2013***

Symptoms

An application that uses the TopLink Essentials Java Persistence API (JPA) bundled with the GlassFish Server could receive a java.lang.ArrayIndexOutOfBoundsException: Array index out of range exception.  An example of the sort of exception stack is shown below:

[#|2010-10-29T21:46:28.745+0900|WARNING|sun-appserver2.1|oracle.toplink.essentials.session..|_ThreadID=17;_ThreadName=p: thread-pool-1; w: 27;_RequestID=2ca5f41f-7f0e-4417-bd3d-584a77a71c17;|
java.lang.ArrayIndexOutOfBoundsException: Array index out of range: 1
at oracle.toplink.essentials.internal.helper.NonSynchronizedVector.get(NonSynchronizedVector.java:287)
at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.extractPrimaryKeyFromRow(ObjectBuilder.java:1557)
at oracle.toplink.essentials.internal.descriptors.ObjectBuilder.buildObject(ObjectBuilder.java:351)
at oracle.toplink.essentials.queryframework.ReportQueryResult.processItem(ReportQueryResult.java:220)
at oracle.toplink.essentials.queryframework.ReportQueryResult.buildResult(ReportQueryResult.java:182)
at oracle.toplink.essentials.queryframework.ReportQueryResult.<init>(ReportQueryResult.java:98)
at oracle.toplink.essentials.queryframework.ReportQuery.buildObject(ReportQuery.java:594)
at oracle.toplink.essentials.queryframework.ReportQuery.buildObjects(ReportQuery.java:643)
at oracle.toplink.essentials.queryframework.ReportQuery.executeDatabaseQuery(ReportQuery.java:804)
at oracle.toplink.essentials.queryframework.DatabaseQuery.execute(DatabaseQuery.java:628)
at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.execute(ObjectLevelReadQuery.java:692)
at oracle.toplink.essentials.queryframework.ObjectLevelReadQuery.executeInUnitOfWork(ObjectLevelReadQuery.java:746)
at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2244)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:952)
at oracle.toplink.essentials.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:924)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.executeReadQuery(EJBQueryImpl.java:367)
at oracle.toplink.essentials.internal.ejb.cmp3.base.EJBQueryImpl.getSingleResult(EJBQueryImpl.java:508)
...
|#]

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