openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Vorburger (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-953) ArrayIndexOutOfBoundsException in org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve
Date Wed, 04 Mar 2009 09:17:56 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-953?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678653#action_12678653
] 

Michael Vorburger commented on OPENJPA-953:
-------------------------------------------

The attached test case/project illustrates this problem and produces the stack trace I'll
add as comment when run as mvn test:

<openjpa-1.2.0-r422266:683325 nonfatal user error> org.apache.openjpa.persistence.ArgumentException:
2  at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:814)
 at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:775)
 at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:771)
 at org.apache.openjpa.kernel.DelegatingQuery.execute(DelegatingQuery.java:517)
 at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:254)
 at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:293)
 at com.odcgroup.tangij.nls.LabelsDAO.getAllLabels(LabelsDAO.java:38)
 at com.odcgroup.tangij.nls.LabelsDAOTest.testLabels(LabelsDAOTest.java:34)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
 at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
 at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
 at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
 at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
 at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
 at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
 at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
 at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
 at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
 at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
 at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
 at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
 at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ArrayIndexOutOfBoundsException: 2  at org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve(ApplicationIds.java:602)
 at org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.fetchLongField(ApplicationIds.java:578)
 at com.odcgroup.tangij.domainmodel.DictLanguageLabelEntity.pcCopyKeyFieldsToObjectId(DictLanguageLabelEntity.java)
 at org.apache.openjpa.enhance.PCRegistry.copyKeyFieldsToObjectId(PCRegistry.java:172)
 at org.apache.openjpa.util.ApplicationIds.fromPKValues(ApplicationIds.java:218)
 at org.apache.openjpa.jdbc.meta.ClassMapping.getObjectId(ClassMapping.java:213)
 at org.apache.openjpa.jdbc.meta.ClassMapping.getObjectId(ClassMapping.java:150)
 at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:910)
 at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:278)
 at org.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2391)
 at org.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:272)
 at org.apache.openjpa.jdbc.kernel.InstanceResultObjectProvider.getResultObject(InstanceResultObjectProvider.java:59)
 at org.apache.openjpa.lib.rop.EagerResultList.<init>(EagerResultList.java:36)
 at org.apache.openjpa.kernel.QueryImpl.toResult(QueryImpl.java:1228)
 at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:990)
 at org.apache.openjpa.kernel.QueryImpl.execute(QueryImpl.java:805)
 ... 29 more

> ArrayIndexOutOfBoundsException in org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve
> --------------------------------------------------------------------------------------------------------
>
>                 Key: OPENJPA-953
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-953
>             Project: OpenJPA
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Michael Vorburger
>
> As per the email thread "ArrayIndexOutOfBoundsException in org.apache.openjpa.util.ApplicationIds$PrimaryKeyFieldManager.retrieve"
on users@openjpa.apache.org yesterday (see http://n2.nabble.com/ArrayIndexOutOfBoundsException-in-org.apache.openjpa.util.ApplicationIds%24PrimaryKeyFieldManager.retrieve-tt2417570.html#a2417570),
there is a confirmed (Fay Wang) openjpa bug when using  application ID Identity Hierarchies
as per http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/manual/jpa_overview_pc_identity.html#jpa_overview_pc_identity_hierarchy,
may be because I was trying to use them together with Entities as Identity Fields as per
> http://openjpa.apache.org/builds/1.2.0/apache-openjpa-1.2.0/docs/manual/ref_guide_pc_oid.html#ref_guide_pc_oid_entitypk.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message