openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kevin Sutter (JIRA)" <j...@apache.org>
Subject [jira] Commented: (OPENJPA-95) @IdClass annotation for id field type of byte[]
Date Wed, 03 Jan 2007 23:15:27 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-95?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462082
] 

Kevin Sutter commented on OPENJPA-95:
-------------------------------------

I just attached the three files (Agent, Guid, and ManagedElement) used to reproduce the problem.

> @IdClass annotation for id field type of byte[]
> -----------------------------------------------
>
>                 Key: OPENJPA-95
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-95
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: jdbc
>         Environment: Oracle
>            Reporter: Kevin Sutter
>         Assigned To: Marc Prud'hommeaux
>         Attachments: Agent.java, Guid.java, ManagedElement.java
>
>
> This problem was first reported via the dev mailing list starting with this message:
> http://mail-archives.apache.org/mod_mbox/incubator-open-jpa-dev/200701.mbox/%3c89c0c52c0701021503q4bb23dcah248f6fa99c60564a@mail.gmail.com%3e
> It seems that we are having a problem with processing byte[] fields as identity fields
when running with Oracle.  The same scenario works just fine with DB2 and Derby.  Marc seems
to think this is related to some special blob processing that is in place for Oracle.
> The Exception (and message) that is thrown is:
> Caused by: <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException: You
cannot join on column "MNGD_ELEMENT.ME_GUID".  It is not managed by a mapping that supports
joins.
> The complete call stack follows:
> 1500  TRACE  [main] openjpa.MetaData -     Resolving field "model.X509Cert@31116492.agent".
> <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException : Errors encountered
while resolving metadata.  See nested exceptions for details.
>     at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:501)
>     at org.apache.openjpa.meta.MetaDataRepository.getMetaData (MetaDataRepository.java:283)
>     at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:338)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java
:151)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:131)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java
:211)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:181)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java
:174)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$1(JPQLExpressionBuilder.java:173)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1658)
>     at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
>     at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:145)
>     at org.apache.openjpa.kernel.QueryImpl.newCompilation (QueryImpl.java:642)
>     at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:623)
>     at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:589)
>     at org.apache.openjpa.kernel.QueryImpl.compileForExecutor (QueryImpl.java:651)
>     at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1464)
>     at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:120)
>     at org.apache.openjpa.persistence.QueryImpl.execute (QueryImpl.java:202)
>     at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251)
>     at jpa.test.LoadTestCase.testLoadAgents(LoadTestCase.java:30)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at junit.framework.TestCase.runTest(TestCase.java:154)
>     at junit.framework.TestCase.runBare(TestCase.java:127)
>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>     at junit.framework.TestResult.runProtected (TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java
:478)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Caused by: <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException: You
cannot join on column "MNGD_ELEMENT.ME_GUID".  It is not managed by a mapping that supports
joins.
>     at org.apache.openjpa.jdbc.meta.ClassMapping.assertJoinable (ClassMapping.java:235)
>     at org.apache.openjpa.jdbc.meta.strats.VerticalClassStrategy.map(VerticalClassStrategy.java:99)
>     at org.apache.openjpa.jdbc.meta.ClassMapping.setStrategy(ClassMapping.java:343)
>     at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java:52)
>     at org.apache.openjpa.jdbc.meta.MappingRepository.prepareMapping(MappingRepository.java:305)
>     at org.apache.openjpa.meta.MetaDataRepository.preMapping (MetaDataRepository.java:600)
>     at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:487)
>     ... 33 more
> NestedThrowables:
> <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException : You cannot join
on column "MNGD_ELEMENT.ME_GUID".  It is not managed by a mapping that supports joins.
>     at org.apache.openjpa.jdbc.meta.ClassMapping.assertJoinable(ClassMapping.java:235)
>     at org.apache.openjpa.jdbc.meta.strats.VerticalClassStrategy.map (VerticalClassStrategy.java:99)
>     at org.apache.openjpa.jdbc.meta.ClassMapping.setStrategy(ClassMapping.java:343)
>     at org.apache.openjpa.jdbc.meta.RuntimeStrategyInstaller.installStrategy(RuntimeStrategyInstaller.java
:52)
>     at org.apache.openjpa.jdbc.meta.ClassMapping.resolveMapping(ClassMapping.java:768)
>     at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1569)
>     at org.apache.openjpa.meta.MetaDataRepository.processBuffer (MetaDataRepository.java:654)
>     at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:615)
>     at org.apache.openjpa.meta.MetaDataRepository.resolve(MetaDataRepository.java:493)
>     at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
>     at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:338)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData (JPQLExpressionBuilder.java:151)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:131)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData (JPQLExpressionBuilder.java:211)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:181)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType (JPQLExpressionBuilder.java:174)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$1(JPQLExpressionBuilder.java:173)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java
:1658)
>     at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
>     at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:145)
>     at org.apache.openjpa.kernel.QueryImpl.newCompilation (QueryImpl.java:642)
>     at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:623)
>     at org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:589)
>     at org.apache.openjpa.kernel.QueryImpl.compileForExecutor (QueryImpl.java:651)
>     at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1464)
>     at org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:120)
>     at org.apache.openjpa.persistence.QueryImpl.execute (QueryImpl.java:202)
>     at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251)
>     at jpa.test.LoadTestCase.testLoadAgents(LoadTestCase.java:30)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at junit.framework.TestCase.runTest(TestCase.java:154)
>     at junit.framework.TestCase.runBare(TestCase.java:127)
>     at junit.framework.TestResult$1.protect(TestResult.java:106)
>     at junit.framework.TestResult.runProtected (TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java
:478)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> <0|true|0.0.0> org.apache.openjpa.persistence.PersistenceException: null
>     at org.apache.openjpa.jdbc.meta.ClassMapping.assertStrategy(ClassMapping.java:954)
>     at org.apache.openjpa.jdbc.meta.ClassMapping.isPrimaryKeyObjectId( ClassMapping.java:920)
>     at org.apache.openjpa.jdbc.meta.ClassMapping.isForeignKeyObjectId(ClassMapping.java:284)
>     at org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.initialize(RelationFieldStrategy.java
:189)
>     at org.apache.openjpa.jdbc.meta.FieldMapping.initializeMapping(FieldMapping.java:483)
>     at org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java:402)
>     at org.apache.openjpa.jdbc.meta.ClassMapping.initializeMapping (ClassMapping.java:830)
>     at org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1574)
>     at org.apache.openjpa.meta.MetaDataRepository.resolveMapping(MetaDataRepository.java:624)
>     at org.apache.openjpa.meta.MetaDataRepository.resolve (MetaDataRepository.java:493)
>     at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:283)
>     at org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:338)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:151)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:131)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:211)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java
:181)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:174)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$1(JPQLExpressionBuilder.java:173)
>     at org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1658)
>     at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
>     at org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation (ExpressionStoreQuery.java:145)
>     at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:642)
>     at org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:623)
>     at org.apache.openjpa.kernel.QueryImpl.compileForCompilation (QueryImpl.java:589)
>     at org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:651)
>     at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1464)
>     at org.apache.openjpa.kernel.DelegatingQuery.getOperation (DelegatingQuery.java:120)
>     at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:202)
>     at org.apache.openjpa.persistence.QueryImpl.getResultList(QueryImpl.java:251)
>     at jpa.test.LoadTestCase.testLoadAgents (LoadTestCase.java:30)
>     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>     at java.lang.reflect.Method.invoke(Unknown Source)
>     at junit.framework.TestCase.runTest(TestCase.java:154)
>     at junit.framework.TestCase.runBare(TestCase.java:127)
>     at junit.framework.TestResult$1.protect (TestResult.java:106)
>     at junit.framework.TestResult.runProtected(TestResult.java:124)
>     at junit.framework.TestResult.run(TestResult.java:109)
>     at junit.framework.TestCase.run(TestCase.java:118)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
>     at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main (RemoteTestRunner.java:196)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message