openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marc Prud'hommeaux <mprud...@apache.org>
Subject Re: OPENJPA-228:Could not locate metadata for the class using alias
Date Thu, 03 May 2007 14:34:05 GMT
Henning-

Do you have the "User" class listed in a <class> tag in your  
persistence.xml file? Can you show us your persistence.xml file?


On May 3, 2007, at 9:07 AM, Blume H., ITSC Bonn, RTB, DA wrote:

> I tried to execute an unnamed query (using the 0.9.7 release) and got
> the following
>
>
>
> ArgumentException:  Could not locate metadata for the class using  
> alias
> "User".
>
>
>
> All named queries on that same entity work fine.
>
> All mapping is specified externally (orm.xml; no Annotations). The
> Structure is very simple (no MapppedSuperClass etc.).
>
>
>
> I lurked into your issue tracker and found this bug fixed recently.  
> Has
> that fix gone into the 0.9.7 release?
>
>
>
> Does it matter that my app runs in a Spring container (2.0.4)? I  
> got the
> following stack trace
>
>
>
> Caused by: <0.9.7-incubating fatal user error>
> org.apache.openjpa.persistence.ArgumentException: Could not locate
> metadata for the class using alias "User". Registered alias mappings:
> "{User=null}"
>
>       at
> org.apache.openjpa.meta.MetaDataRepository.getMetaData 
> (MetaDataRepositor
> y.java:348)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData( 
> JP
> QLExpressionBuilder.java:167)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaD 
> at
> a(JPQLExpressionBuilder.java:145)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD 
> at
> a(JPQLExpressionBuilder.java:214)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaD 
> at
> a(JPQLExpressionBuilder.java:184)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType( 
> JP
> QLExpressionBuilder.java:177)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500 
> (JPQLExpr
> essionBuilder.java:64)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder 
> $ParsedJPQL.populate
> (JPQLExpressionBuilder.java:1671)
>
>       at
> org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:55)
>
>       at
> org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation 
> (E
> xpressionStoreQuery.java:148)
>
>       at
> org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:649)
>
>       at
> org.apache.openjpa.kernel.QueryImpl.compilationFromCache 
> (QueryImpl.java:
> 630)
>
>       at
> org.apache.openjpa.kernel.QueryImpl.compileForCompilation 
> (QueryImpl.java
> :596)
>
>       at
> org.apache.openjpa.kernel.QueryImpl.compileForExecutor 
> (QueryImpl.java:65
> 8)
>
>       at
> org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1483)
>
>       at
> org.apache.openjpa.kernel.DelegatingQuery.getOperation 
> (DelegatingQuery.j
> ava:123)
>
>       at
> org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:219)
>
>       at
> org.apache.openjpa.persistence.QueryImpl.getResultList 
> (QueryImpl.java:26
> 9)
>
>       at
> com.deutschepost.pbts.integrationLayer.implementation.UserProcessorImp 
> l.
> getUsers(UserProcessorImpl.java:63)
>
>       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.springframework.aop.support.AopUtils.invokeJoinpointUsingReflectio 
> n(
> AopUtils.java:304)
>
>       at
> org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoi 
> np
> oint(ReflectiveMethodInvocation.java:172)
>
>       at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed 
> (Ref
> lectiveMethodInvocation.java:139)
>
>       at
> org.springframework.dao.support.PersistenceExceptionTranslationInterce 
> pt
> or.invoke(PersistenceExceptionTranslationInterceptor.java:137)
>
>       at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed 
> (Ref
> lectiveMethodInvocation.java:161)
>
>       at
> org.springframework.transaction.interceptor.TransactionInterceptor.inv 
> ok
> e(TransactionInterceptor.java:107)
>
>       at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed 
> (Ref
> lectiveMethodInvocation.java:161)
>
>       at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke 
> (JdkDynamicAo
> pProxy.java:203)
>
>       at $Proxy10.getUsers(Unknown Source)
>
>       at
> com.deutschepost.pbts.integrationLayer.implementation.DomainManagerImp 
> l.
> getUsers(DomainManagerImpl.java:54)
>
>       at SpendTester.testFindUser(SpendTester.java:58)
>
>       at SpendTester.main(SpendTester.java:36)
>
>
>
>
>
> What else do I oversee? Any help is appreciated
>
>
>
> - Henning
>
>
>
>
>


Mime
View raw message