openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Prueller" <hans.pruel...@gmx.net>
Subject Re: RE: Duplicate Query - where none exists
Date Thu, 05 Apr 2007 06:58:34 GMT
I also don't think that this is related to the global namespace because I started naming my
queries with class-specific prefixes, e.g. "PositionLog.findById" - and I got this warning
also on those...

Hans

-------- Original-Nachricht --------
Datum: Wed, 4 Apr 2007 23:03:16 -0400
Von: "Phill Moran" <pjmoran@rogers.com>
An: open-jpa-dev@incubator.apache.org
Betreff: RE: Duplicate Query - where none exists

> I did a workspace search and it exists in only one place. Also if I
> comment out
> the one it complains about it complains about the next one. But only in
> this
> java file. I even did an clean and build to make sure there were no old
> class
> files hanging out.
> 
> -----Original Message-----
> From: Dain Sundstrom [mailto:dain@iq80.com] 
> Sent: April 4, 2007 5:06 PM
> To: open-jpa-dev@incubator.apache.org
> Subject: Re: Duplicate Query - where none exists
> 
> I think I saw this once.  The problem is in JPA named queries are all
> contained
> in a single global namespace, so if you have to persistent beans that
> define
> queries with the same name you get a warning.  It would be nice if the
> warning
> told you where the duplicate declarations are located.
> 
> -dain
> 
> On Apr 3, 2007, at 10:07 PM, Phill Moran wrote:
> 
> > Anyone seen this before
> >
> > WARN   [main] openjpa.MetaData - Found duplicate query "StoreFXPK"  
> > in "class
> > .....".  Ignoring.
> >
> > This class has only three such named queries all different names and 
> > different actual queries. See following @NamedQueries( {
> > 		@NamedQuery(name = "StoreFXPK", query = "SELECT s FROM Store s
> WHERE 
> > s.id = :primaryKey"),
> > 		@NamedQuery(name = "StoreFXTypeAndName", query = "SELECT s FROM 
> > Store s WHERE s.type = :type AND UPPER(s.name) LIKE :storeName OR
> > UPPER(s.displayName) = :storeName2"),
> > 		@NamedQuery(name = "StoreFXName", query = "SELECT s FROM Store s
> 
> > WHERE UPPER(s.name) = :storeName OR UPPER(s.displayName) = 
> > :storeName2")
> > 		})
> >
> > I even renamed the duplicate parms to make sure it was not a trickle 
> > down exception. Not only that, if I comment out the StoreFXPK query I 
> > get the same error on the next named Query. I did a search on the 
> > workspace an this is only used in one place (factory class) and define 
> > in another (persistent class). I have no doubt this is something I 
> > have done but am unsure what it is I get the follow stack trace when 
> > executing the following line:
> >
> > Query q = em.createNamedQuery("StoreFXName"); <- not the same query 
> > mentioned in the above warning...the plot thickens
> >
> > The unmapped field in the stack trace is mapped.
> >
> > <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:2
> > 83)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:3
> > 38)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(
> > JPQLExpres
> > sionBuilder.java:151)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaD
> > ata(JPQLEx
> > pressionBuilder.java:131)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:211)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:181)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(
> > JPQLExpres
> > sionBuilder.java:174)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500
> > (JPQLExpressionBu
> > ilder.java:61)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder
> > $ParsedJPQL.populate(JPQLExp
> > ressionBuilder.java:1657)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
> > 	at
> > org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation
> > (Expressio
> > nStoreQuery.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.compile(QueryImpl.java:558)
> > 	at
> > org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery
> > (EntityManagerI
> > mpl.java:699)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.orm.jpa.ExtendedEntityManagerCreator
> > $ExtendedEntityManagerIn
> > vocationHandler.invoke(ExtendedEntityManagerCreator.java:237)
> > 	at $Proxy34.createNamedQuery(Unknown Source)
> > 	at
> > ca.BidSpec.emall.stores.StoreFactoryImpl.getStoreValueObjectByName
> > (StoreFactoryI
> > mpl.java:88)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio
> > n(AopUtils
> > .java:280)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi
> > npoint(Ref
> > lectiveMethodInvocation.java:187)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:154)
> > 	at
> > org.springframework.transaction.interceptor.TransactionInterceptor.inv
> > oke(Transa
> > ctionInterceptor.java:107)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:176)
> > 	at
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke
> > (JdkDynamicAopProxy.j
> > ava:210)
> > 	at $Proxy32.getStoreValueObjectByName(Unknown Source)
> > 	at
> > ca.BidSpec.testing.emall.UserFactoryTest.testSetup
> > (UserFactoryTest.java:110)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at junit.framework.TestCase.runTest(TestCase.java:164)
> > 	at junit.framework.TestCase.runBare(TestCase.java:130)
> > 	at
> > org.springframework.test.ConditionalTestCase.runBare
> > (ConditionalTestCase.java:69
> > )
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ac
> > cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests$1.
> > run(AbstractAnnotationAwareTransactionalTests.java:112)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTest(AbstractAnnotationAwareTransactionalTests.java:177)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nBare(AbstractAnnotationAwareTransactionalTests.java:108)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:159)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:239)
> > 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> > 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> > 	at junit.framework.TestResult.run(TestResult.java:113)
> > 	at junit.framework.TestCase.run(TestCase.java:120)
> > 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> > 	at junit.framework.TestSuite.run(TestSuite.java:223)
> > 	at
> > org.junit.internal.runners.OldTestClassRunner.run
> > (OldTestClassRunner.java:35)
> > 	at
> > org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java: 
> > 29)
> > 	at
> > org.junit.internal.runners.TestClassRunner$1.runUnprotected
> > (TestClassRunner.java
> > :42)
> > 	at
> > org.junit.internal.runners.BeforeAndAfterRunner.runProtected
> > (BeforeAndAfterRunne
> > r.java:34)
> > 	at
> > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java: 
> > 52)
> > 	at
> > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
> > (JUnit4TestReferen
> > ce.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.jav
> > a:196)
> > Caused by: <4|true|0.0.0>
> > org.apache.openjpa.persistence.ArgumentException: You cannot join on 
> > column "category.categoryTypeFK".  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.ClassMapping.isForeignKeyObjectId
> > (ClassMapping.java
> > :299)
> > 	at
> > org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.initialize
> > (RelationFie
> > ldStrategy.java:189)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.initializeMapping
> > (FieldMapping.java:48
> > 3)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java: 
> > 402)
> > 	at
> > org.apache.openjpa.jdbc.meta.ClassMapping.initializeMapping
> > (ClassMapping.java:83
> > 0)
> > 	at
> > org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1574)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolveMapping
> > (MetaDataRepository.jav
> > a:624)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolve
> > (MetaDataRepository.java:493)
> > 	... 67 more
> > NestedThrowables:
> > <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException:  
> > You cannot join
> > on column "category.categoryTypeFK".  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.ClassMapping.isForeignKeyObjectId
> > (ClassMapping.java
> > :299)
> > 	at
> > org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.initialize
> > (RelationFie
> > ldStrategy.java:189)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.initializeMapping
> > (FieldMapping.java:48
> > 3)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java: 
> > 402)
> > 	at
> > org.apache.openjpa.jdbc.meta.ClassMapping.initializeMapping
> > (ClassMapping.java:83
> > 0)
> > 	at
> > org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1574)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolveMapping
> > (MetaDataRepository.jav
> > a:624)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolve
> > (MetaDataRepository.java:493)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:2
> > 83)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:3
> > 38)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(
> > JPQLExpres
> > sionBuilder.java:151)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaD
> > ata(JPQLEx
> > pressionBuilder.java:131)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:211)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:181)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(
> > JPQLExpres
> > sionBuilder.java:174)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500
> > (JPQLExpressionBu
> > ilder.java:61)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder
> > $ParsedJPQL.populate(JPQLExp
> > ressionBuilder.java:1657)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
> > 	at
> > org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation
> > (Expressio
> > nStoreQuery.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.compile(QueryImpl.java:558)
> > 	at
> > org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery
> > (EntityManagerI
> > mpl.java:699)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.orm.jpa.ExtendedEntityManagerCreator
> > $ExtendedEntityManagerIn
> > vocationHandler.invoke(ExtendedEntityManagerCreator.java:237)
> > 	at $Proxy34.createNamedQuery(Unknown Source)
> > 	at
> > ca.BidSpec.emall.stores.StoreFactoryImpl.getStoreValueObjectByName
> > (StoreFactoryI
> > mpl.java:88)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio
> > n(AopUtils
> > .java:280)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi
> > npoint(Ref
> > lectiveMethodInvocation.java:187)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:154)
> > 	at
> > org.springframework.transaction.interceptor.TransactionInterceptor.inv
> > oke(Transa
> > ctionInterceptor.java:107)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:176)
> > 	at
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke
> > (JdkDynamicAopProxy.j
> > ava:210)
> > 	at $Proxy32.getStoreValueObjectByName(Unknown Source)
> > 	at
> > ca.BidSpec.testing.emall.UserFactoryTest.testSetup
> > (UserFactoryTest.java:110)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at junit.framework.TestCase.runTest(TestCase.java:164)
> > 	at junit.framework.TestCase.runBare(TestCase.java:130)
> > 	at
> > org.springframework.test.ConditionalTestCase.runBare
> > (ConditionalTestCase.java:69
> > )
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ac
> > cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests$1.
> > run(AbstractAnnotationAwareTransactionalTests.java:112)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTest(AbstractAnnotationAwareTransactionalTests.java:177)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nBare(AbstractAnnotationAwareTransactionalTests.java:108)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:159)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:239)
> > 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> > 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> > 	at junit.framework.TestResult.run(TestResult.java:113)
> > 	at junit.framework.TestCase.run(TestCase.java:120)
> > 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> > 	at junit.framework.TestSuite.run(TestSuite.java:223)
> > 	at
> > org.junit.internal.runners.OldTestClassRunner.run
> > (OldTestClassRunner.java:35)
> > 	at
> > org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java: 
> > 29)
> > 	at
> > org.junit.internal.runners.TestClassRunner$1.runUnprotected
> > (TestClassRunner.java
> > :42)
> > 	at
> > org.junit.internal.runners.BeforeAndAfterRunner.runProtected
> > (BeforeAndAfterRunne
> > r.java:34)
> > 	at
> > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java: 
> > 52)
> > 	at
> > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
> > (JUnit4TestReferen
> > ce.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.jav
> > a:196)
> > <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException:  
> > You cannot join
> > on column "category.categoryTypeFK".  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.ClassMapping.isForeignKeyObjectId
> > (ClassMapping.java
> > :299)
> > 	at
> > org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.initialize
> > (RelationFie
> > ldStrategy.java:189)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.initializeMapping
> > (FieldMapping.java:48
> > 3)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java: 
> > 402)
> > 	at
> > org.apache.openjpa.jdbc.meta.ClassMapping.initializeMapping
> > (ClassMapping.java:83
> > 0)
> > 	at
> > org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1574)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolveMapping
> > (MetaDataRepository.jav
> > a:624)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolve
> > (MetaDataRepository.java:493)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:2
> > 83)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:3
> > 38)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(
> > JPQLExpres
> > sionBuilder.java:151)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaD
> > ata(JPQLEx
> > pressionBuilder.java:131)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:211)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:181)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(
> > JPQLExpres
> > sionBuilder.java:174)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500
> > (JPQLExpressionBu
> > ilder.java:61)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder
> > $ParsedJPQL.populate(JPQLExp
> > ressionBuilder.java:1657)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
> > 	at
> > org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation
> > (Expressio
> > nStoreQuery.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.compile(QueryImpl.java:558)
> > 	at
> > org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery
> > (EntityManagerI
> > mpl.java:699)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.orm.jpa.ExtendedEntityManagerCreator
> > $ExtendedEntityManagerIn
> > vocationHandler.invoke(ExtendedEntityManagerCreator.java:237)
> > 	at $Proxy34.createNamedQuery(Unknown Source)
> > 	at
> > ca.BidSpec.emall.stores.StoreFactoryImpl.getStoreValueObjectByName
> > (StoreFactoryI
> > mpl.java:88)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio
> > n(AopUtils
> > .java:280)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi
> > npoint(Ref
> > lectiveMethodInvocation.java:187)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:154)
> > 	at
> > org.springframework.transaction.interceptor.TransactionInterceptor.inv
> > oke(Transa
> > ctionInterceptor.java:107)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:176)
> > 	at
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke
> > (JdkDynamicAopProxy.j
> > ava:210)
> > 	at $Proxy32.getStoreValueObjectByName(Unknown Source)
> > 	at
> > ca.BidSpec.testing.emall.UserFactoryTest.testSetup
> > (UserFactoryTest.java:110)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at junit.framework.TestCase.runTest(TestCase.java:164)
> > 	at junit.framework.TestCase.runBare(TestCase.java:130)
> > 	at
> > org.springframework.test.ConditionalTestCase.runBare
> > (ConditionalTestCase.java:69
> > )
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ac
> > cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests$1.
> > run(AbstractAnnotationAwareTransactionalTests.java:112)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTest(AbstractAnnotationAwareTransactionalTests.java:177)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nBare(AbstractAnnotationAwareTransactionalTests.java:108)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:159)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:239)
> > 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> > 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> > 	at junit.framework.TestResult.run(TestResult.java:113)
> > 	at junit.framework.TestCase.run(TestCase.java:120)
> > 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> > 	at junit.framework.TestSuite.run(TestSuite.java:223)
> > 	at
> > org.junit.internal.runners.OldTestClassRunner.run
> > (OldTestClassRunner.java:35)
> > 	at
> > org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java: 
> > 29)
> > 	at
> > org.junit.internal.runners.TestClassRunner$1.runUnprotected
> > (TestClassRunner.java
> > :42)
> > 	at
> > org.junit.internal.runners.BeforeAndAfterRunner.runProtected
> > (BeforeAndAfterRunne
> > r.java:34)
> > 	at
> > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java: 
> > 52)
> > 	at
> > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
> > (JUnit4TestReferen
> > ce.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.jav
> > a:196)
> > <4|true|0.0.0> org.apache.openjpa.persistence.ArgumentException:  
> > You cannot join
> > on column "category.categoryTypeFK".  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.ClassMapping.isForeignKeyObjectId
> > (ClassMapping.java
> > :299)
> > 	at
> > org.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.initialize
> > (RelationFie
> > ldStrategy.java:189)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.initializeMapping
> > (FieldMapping.java:48
> > 3)
> > 	at
> > org.apache.openjpa.jdbc.meta.FieldMapping.resolve(FieldMapping.java: 
> > 402)
> > 	at
> > org.apache.openjpa.jdbc.meta.ClassMapping.initializeMapping
> > (ClassMapping.java:83
> > 0)
> > 	at
> > org.apache.openjpa.meta.ClassMetaData.resolve(ClassMetaData.java:1574)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolveMapping
> > (MetaDataRepository.jav
> > a:624)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.resolve
> > (MetaDataRepository.java:493)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:2
> > 83)
> > 	at
> > org.apache.openjpa.meta.MetaDataRepository.getMetaData
> > (MetaDataRepository.java:3
> > 38)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(
> > JPQLExpres
> > sionBuilder.java:151)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaD
> > ata(JPQLEx
> > pressionBuilder.java:131)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:211)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD
> > ata(JPQLEx
> > pressionBuilder.java:181)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(
> > JPQLExpres
> > sionBuilder.java:174)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500
> > (JPQLExpressionBu
> > ilder.java:61)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder
> > $ParsedJPQL.populate(JPQLExp
> > ressionBuilder.java:1657)
> > 	at
> > org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:52)
> > 	at
> > org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation
> > (Expressio
> > nStoreQuery.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.compile(QueryImpl.java:558)
> > 	at
> > org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery
> > (EntityManagerI
> > mpl.java:699)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.orm.jpa.ExtendedEntityManagerCreator
> > $ExtendedEntityManagerIn
> > vocationHandler.invoke(ExtendedEntityManagerCreator.java:237)
> > 	at $Proxy34.createNamedQuery(Unknown Source)
> > 	at
> > ca.BidSpec.emall.stores.StoreFactoryImpl.getStoreValueObjectByName
> > (StoreFactoryI
> > mpl.java:88)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at
> > org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio
> > n(AopUtils
> > .java:280)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi
> > npoint(Ref
> > lectiveMethodInvocation.java:187)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:154)
> > 	at
> > org.springframework.transaction.interceptor.TransactionInterceptor.inv
> > oke(Transa
> > ctionInterceptor.java:107)
> > 	at
> > org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
> > (ReflectiveM
> > ethodInvocation.java:176)
> > 	at
> > org.springframework.aop.framework.JdkDynamicAopProxy.invoke
> > (JdkDynamicAopProxy.j
> > ava:210)
> > 	at $Proxy32.getStoreValueObjectByName(Unknown Source)
> > 	at
> > ca.BidSpec.testing.emall.UserFactoryTest.testSetup
> > (UserFactoryTest.java:110)
> > 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> > 	at
> > sun.reflect.NativeMethodAccessorImpl.invoke
> > (NativeMethodAccessorImpl.java:39)
> > 	at
> > sun.reflect.DelegatingMethodAccessorImpl.invoke
> > (DelegatingMethodAccessorImpl.jav
> > a:25)
> > 	at java.lang.reflect.Method.invoke(Method.java:597)
> > 	at junit.framework.TestCase.runTest(TestCase.java:164)
> > 	at junit.framework.TestCase.runBare(TestCase.java:130)
> > 	at
> > org.springframework.test.ConditionalTestCase.runBare
> > (ConditionalTestCase.java:69
> > )
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ac
> > cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests$1.
> > run(AbstractAnnotationAwareTransactionalTests.java:112)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTest(AbstractAnnotationAwareTransactionalTests.java:177)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
> > 	at
> > org.springframework.test.annotation.AbstractAnnotationAwareTransaction
> > alTests.ru
> > nBare(AbstractAnnotationAwareTransactionalTests.java:108)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:159)
> > 	at
> > org.springframework.test.jpa.AbstractJpaTests.runBare
> > (AbstractJpaTests.java:239)
> > 	at junit.framework.TestResult$1.protect(TestResult.java:110)
> > 	at junit.framework.TestResult.runProtected(TestResult.java:128)
> > 	at junit.framework.TestResult.run(TestResult.java:113)
> > 	at junit.framework.TestCase.run(TestCase.java:120)
> > 	at junit.framework.TestSuite.runTest(TestSuite.java:228)
> > 	at junit.framework.TestSuite.run(TestSuite.java:223)
> > 	at
> > org.junit.internal.runners.OldTestClassRunner.run
> > (OldTestClassRunner.java:35)
> > 	at
> > org.junit.internal.runners.CompositeRunner.run(CompositeRunner.java: 
> > 29)
> > 	at
> > org.junit.internal.runners.TestClassRunner$1.runUnprotected
> > (TestClassRunner.java
> > :42)
> > 	at
> > org.junit.internal.runners.BeforeAndAfterRunner.runProtected
> > (BeforeAndAfterRunne
> > r.java:34)
> > 	at
> > org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java: 
> > 52)
> > 	at
> > org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
> > (JUnit4TestReferen
> > ce.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.jav
> > a:196)
> >
> >
> > Phill
> >

-- 
"Feel free" - 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail

Mime
View raw message