openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Phill Moran" <pjmo...@rogers.com>
Subject RE: Duplicate Query - where none exists
Date Thu, 05 Apr 2007 03:34:29 GMT
I think you may be on to something and have been looking into it. It is mapped
and I thought worked but I am learning that I have a pretty messed up config (I
had both Toplink and OpenJPA, I am accessing fields directly not through getters
and am not positive that the mapping is right as it is one to many). I have
other versions of the same mapping and this fairly commonly used class for my
application as it represents categories that are grouped by categoryTpye. It
does have a relation into the offended query class though

- Here is the pertinent parts of the Store class:

	@ManyToOne
	@JoinColumn(name = "typeFK", referencedColumnName = "id")
	public Category getType() throws StoreTypeNotFoundException {
		return type;
	}

- Here is the pertinent parts of the Category class:

@Entity
@Table(name = "category", schema = "bidspec")
@Inheritance(strategy = InheritanceType.TABLE_PER_CLASS)
@NamedQueries( {
		@NamedQuery(name = "CategoryFXType", query = "SELECT c FROM
Category c WHERE c.type = :type"),
		@NamedQuery(name = "CategoryValueObjectFXPK", query = "SELECT c
FROM Category c WHERE c.id = :primaryKey"),
		@NamedQuery(name = "CategoryFXDescription", query = "SELECT c
FROM Category c WHERE UPPER(c.description) LIKE :description ORDER BY
c.description") })
public class Category extends Persistable {

...

	@ManyToOne
	@JoinColumn(name = "categoryTypeFK", referencedColumnName = "id")
	public CategoryType getType() {
		return this.type;
	}

Persistable is my base JPA persistable class housing the String id for all
persistable classes

-----Original Message-----
From: Marc Prud'hommeaux [mailto:mprudhomapache@gmail.com] On Behalf Of Marc
Prud'hommeaux
Sent: April 4, 2007 11:13 PM
To: open-jpa-dev@incubator.apache.org
Subject: Re: Duplicate Query - where none exists

Phill-

While I'm not sure the cause of the duplicate query error, I do notice the
original cause in the nested stack trace is:

> 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.

It could be that this error is indirectly causing the next one.

Have you looked into this? How is categoryTypeFK mapped?




On Apr 4, 2007, at 8:03 PM, Phill Moran wrote:

> 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.resolveClassMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:131)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:211)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> 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.populateFromCompilatio
>> n
>> (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.invokeJoinpointUsingReflecti
>> o
>> n(AopUtils
>> .java:280)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
>> i
>> npoint(Ref
>> lectiveMethodInvocation.java:187)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
>> (ReflectiveM
>> ethodInvocation.java:154)
>> 	at
>> org.springframework.transaction.interceptor.TransactionInterceptor.in
>> v
>> 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.AbstractAnnotationAwareTransactio
>> n
>> alTests.ac
>> cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests$1.
>> run(AbstractAnnotationAwareTransactionalTests.java:112)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTest(AbstractAnnotationAwareTransactionalTests.java:177)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> 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.resolveClassMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:131)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:211)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> 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.populateFromCompilatio
>> n
>> (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.invokeJoinpointUsingReflecti
>> o
>> n(AopUtils
>> .java:280)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
>> i
>> npoint(Ref
>> lectiveMethodInvocation.java:187)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
>> (ReflectiveM
>> ethodInvocation.java:154)
>> 	at
>> org.springframework.transaction.interceptor.TransactionInterceptor.in
>> v
>> 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.AbstractAnnotationAwareTransactio
>> n
>> alTests.ac
>> cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests$1.
>> run(AbstractAnnotationAwareTransactionalTests.java:112)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTest(AbstractAnnotationAwareTransactionalTests.java:177)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> 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.resolveClassMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:131)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:211)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> 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.populateFromCompilatio
>> n
>> (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.invokeJoinpointUsingReflecti
>> o
>> n(AopUtils
>> .java:280)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
>> i
>> npoint(Ref
>> lectiveMethodInvocation.java:187)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
>> (ReflectiveM
>> ethodInvocation.java:154)
>> 	at
>> org.springframework.transaction.interceptor.TransactionInterceptor.in
>> v
>> 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.AbstractAnnotationAwareTransactio
>> n
>> alTests.ac
>> cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests$1.
>> run(AbstractAnnotationAwareTransactionalTests.java:112)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTest(AbstractAnnotationAwareTransactionalTests.java:177)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> 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.resolveClassMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:131)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> ata(JPQLEx
>> pressionBuilder.java:211)
>> 	at
>> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMeta
>> D
>> 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.populateFromCompilatio
>> n
>> (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.invokeJoinpointUsingReflecti
>> o
>> n(AopUtils
>> .java:280)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJo
>> i
>> npoint(Ref
>> lectiveMethodInvocation.java:187)
>> 	at
>> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed
>> (ReflectiveM
>> ethodInvocation.java:154)
>> 	at
>> org.springframework.transaction.interceptor.TransactionInterceptor.in
>> v
>> 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.AbstractAnnotationAwareTransactio
>> n
>> alTests.ac
>> cess$001(AbstractAnnotationAwareTransactionalTests.java:44)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests$1.
>> run(AbstractAnnotationAwareTransactionalTests.java:112)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTest(AbstractAnnotationAwareTransactionalTests.java:177)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> alTests.ru
>> nTestTimed(AbstractAnnotationAwareTransactionalTests.java:150)
>> 	at
>> org.springframework.test.annotation.AbstractAnnotationAwareTransactio
>> n
>> 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
>>
>


Mime
View raw message