|
|
|
Michael Vorburger-4
|
Any idea what the exception below could mean?
I somehow ran into this while playing with FetchGroups and a @PersistentCollection(elementEmbedded = true) field (com.toto.my.PositionValueEntity.positions) that holds an instance of something with an @ManyToOne field (com.toto.my.PositionEntity.instrument) in it... The org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManage rImpl.java:718) is a "if (idx == -1) throw new InternalException(String.valueOf(_meta.getField(field)));" - is there any interest from commiters if I can provide a test case which demonstrates and reproduces this? Regards, Michael Vorburger ____ <openjpa-1.1.0-r422266:657916 fatal general error> org.apache.openjpa.persistence.PersistenceException: com.toto.my.PositionValueEntity.positions.com.toto.my.PositionEntity.ins trument at org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManage rImpl.java:718) at org.apache.openjpa.kernel.StateManagerImpl.setIntermediate(StateManagerI mpl.java:695) at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEmbedded(R elationFieldStrategy.java:862) at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue(Embe dValueHandler.java:165) at org.apache.openjpa.jdbc.meta.strats.ElementEmbedValueHandler.toObjectVal ue(ElementEmbedValueHandler.java:132) at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadObject(Handler Strategies.java:190) at org.apache.openjpa.jdbc.meta.strats.HandlerCollectionTableFieldStrategy. loadElement(HandlerCollectionTableFieldStrategy.java:78) at org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy.load(St oreCollectionFieldStrategy.java:479) at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:802) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.ja va:520) at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreMan ager.java:116) at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) at org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.j ava:2911) at org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.ja va:2989) at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManage rImpl.java:1489) at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerIm pl.java:1474) at com.toto.my.PositionValueEntity.pcGetpositions(PositionValueEntity.java) at com.toto.my.PositionValueEntity.getPositions(PositionValueEntity.java:10 0) at com.odcgroup.mcq.poc.mmltest.DatasetLoadTest.testPortfolioDataset1(Datas etLoadTest.java:127) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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(Met hodRoadie.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(JUnit4Clas sRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunne r.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.jav a:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:2 7) 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(JUnit4Tes tReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja va:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe stRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe stRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun ner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu nner.java:196) _____________________________ Michael Vorburger, Odyssey Financial Technologies Direct phone: +41 21 310 00 86 (OAMS VOIP: 1086) Cell phone: +41 78 805 5541 Mailto: [hidden email] ____________________________________________________________ This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. If you have received this email in error, please notify the sender immediately and delete the original. |
||||||||||||||||
|
Pinaki Poddar
|
Hi,
> is there any interest from commiters if I can provide a test case which demonstrates and reproduces this? Yes. Please post a reproducer test case. Pinaki
|
||||
|
Michael Vorburger-4
|
Hello again Pinaki et al,
>> is there any interest from commiters if I can provide a test case >> which demonstrates and reproduces this? > Yes. Please post a reproducer test case. We ran into this again recently, and after some debugging and reducing a more complex model to a simple version that reproduces this, I've finally understood what causes this org.apache.openjpa.persistence.PersistenceException: ... org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManage rImpl.java:720), under v1.2.0. It's turns out to be actually pretty simple, to reproduce at least: Create a simple domain model with an class A { @Id String code; @PersistentCollection(elementEmbedded = true) Set<B> bs; } and class B { @ManyToOne C cReq; } and class C { @Id String code; }. Create an A/B/C and query the A by it's ID/PK code. The a.getBs() --> BOUM! I could send the real .java for this simple test model by direct email, if of any use. Question: Is it simple to fix also? ;-) If that's "not supported", then please say so in Doc and clear Error Message... :-) but I suspect this may not be intended. Why? Because that https://issues.apache.org/jira/browse/OPENJPA-593 is also about @PersistentCollection(elementEmbedded = true), but agreed that's not the same as this, however note what it's error message says: "Embedded element/key/value types are limited to simple fields and direct relations to other persistent types." ... and a "direct relations to another persistent type" is exactly what that @ManyToOne C cReq on B is, isn't it? Should I file a JIRA? Regards, Michael ___ <openjpa-1.2.0-r422266:683325 fatal general error> org.apache.openjpa.persistence.PersistenceException: com.odcgroup.otf.mdf.jpa.gen.test.UseCase11ClassAEntity.bs.com.odcgroup. otf.mdf.jpa.gen.test.UseCase11ClassBEntity.cReq at org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManage rImpl.java:720) at org.apache.openjpa.kernel.StateManagerImpl.setIntermediate(StateManagerI mpl.java:697) at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEmbedded(R elationFieldStrategy.java:968) at org.apache.openjpa.jdbc.meta.strats.EmbedValueHandler.toObjectValue(Embe dValueHandler.java:165) at org.apache.openjpa.jdbc.meta.strats.ElementEmbedValueHandler.toObjectVal ue(ElementEmbedValueHandler.java:132) at org.apache.openjpa.jdbc.meta.strats.HandlerStrategies.loadObject(Handler Strategies.java:202) at org.apache.openjpa.jdbc.meta.strats.HandlerCollectionTableFieldStrategy. loadElement(HandlerCollectionTableFieldStrategy.java:78) at org.apache.openjpa.jdbc.meta.strats.StoreCollectionFieldStrategy.load(St oreCollectionFieldStrategy.java:606) at org.apache.openjpa.jdbc.meta.FieldMapping.load(FieldMapping.java:819) at org.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.ja va:626) at org.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreMan ager.java:116) at org.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78) at org.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.j ava:2920) at org.apache.openjpa.kernel.StateManagerImpl.loadField(StateManagerImpl.ja va:2998) at org.apache.openjpa.kernel.StateManagerImpl.beforeAccessField(StateManage rImpl.java:1492) at org.apache.openjpa.kernel.StateManagerImpl.accessingField(StateManagerIm pl.java:1477) at com.odcgroup.otf.mdf.jpa.gen.test.UseCase11ClassAEntity.pcGetbs(UseCase1 1ClassAEntity.java) at com.odcgroup.otf.mdf.jpa.gen.test.UseCase11ClassAEntity.getBs(UseCase11C lassAEntity.java:78) at com.odcgroup.mcqdb.poc.UseCase11Test.queryData(UseCase11Test.java:84) at com.odcgroup.mcqdb.poc.UseCase11Test.testUseCase11_JustQuery(UseCase11Te st.java:51) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav a:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor Impl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) 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(Met hodRoadie.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(JUnit4Clas sRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunne r.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.jav a:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:2 7) 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(JUnit4Tes tReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.ja va:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe stRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTe stRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRun ner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRu nner.java:196) -----Original Message----- From: Pinaki Poddar [mailto:[hidden email]] Sent: jeudi, 31. juillet 2008 03:12 To: [hidden email] Subject: Re: at org.apache.openjpa.kernel.StateManagerImpl.setExtraFieldData(StateManage rImpl.java:718) Hi, > is there any interest from commiters if I can provide a test case > which demonstrates and reproduces this? Yes. Please post a reproducer test case. -- View this message in context: http://n2.nabble.com/at-org.apache.openjpa.kernel.StateManagerImpl.setEx traFieldData%28StateManagerImpl.java%3A718%29-tp534870p661496.html Sent from the OpenJPA Users mailing list archive at Nabble.com. ____________________________________________________________ This email and any files transmitted with it are CONFIDENTIAL and intended solely for the use of the individual or entity to which they are addressed. Any unauthorized copying, disclosure, or distribution of the material within this email is strictly forbidden. Any views or opinions presented within this e-mail are solely those of the author and do not necessarily represent those of Odyssey Financial Technologies SA unless otherwise specifically stated. An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. If you have received this email in error, please notify the sender immediately and delete the original. |
||||||||||||||||
| Free Embeddable Forum Powered by Nabble | Help |