openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From get_it_done <dude.on.j...@gmail.com>
Subject org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using alias "person". This could mean that the OpenJPA enhancer or load-time weaver was not run on the type whose alias
Date Tue, 24 Jun 2008 21:13:29 GMT

Hello,
        I am using Spring 2.5 and OpenJPA and MySQL. When I try to persist
an entity, I get the following exception.

09  base  INFO   [main] openjpa.Runtime - Starting OpenJPA 1.0.1
140  base  INFO   [main] openjpa.jdbc.JDBC - Using dictionary class
"org.apache.openjpa.jdbc.sql.MySQLDictionary".
687  base  INFO   [main] openjpa.Enhance - Creating subclass for "[class
ak.jpa.entities.Person]". This means that your application will be less
efficient and will consume more memory than it would if you ran the OpenJPA
enhancer. Additionally, lazy loading will not be available for one-to-one
and many-to-one persistent attributes in types using field access; they will
be loaded eagerly instead.
Exception in thread "main" <openjpa-1.0.1-r420667:592145 fatal user error>
org.apache.openjpa.persistence.ArgumentException: Could not locate metadata
for the class using alias "person". This could mean that the OpenJPA
enhancer or load-time weaver was not run on the type whose alias is
"person". Registered alias mappings: "{person=null, Person=[class
trial.jpa.entities.Person]}"
	at
org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:362)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:169)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:147)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:216)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateMetaData(JPQLExpressionBuilder.java:186)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getCandidateType(JPQLExpressionBuilder.java:179)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.access$500(JPQLExpressionBuilder.java:66)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1678)
	at org.apache.openjpa.kernel.jpql.JPQLParser.populate(JPQLParser.java:55)
	at
org.apache.openjpa.kernel.ExpressionStoreQuery.populateFromCompilation(ExpressionStoreQuery.java:148)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:652)
	at
org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:633)
	at
org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:599)
	at
org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:661)
	at org.apache.openjpa.kernel.QueryImpl.getOperation(QueryImpl.java:1487)
	at
org.apache.openjpa.kernel.DelegatingQuery.getOperation(DelegatingQuery.java:123)
	at org.apache.openjpa.persistence.QueryImpl.execute(QueryImpl.java:227)
	at
org.apache.openjpa.persistence.QueryImpl.getSingleResult(QueryImpl.java:300)
	at ak.jpa.daos.PersonDaoJpaImpl.findPersonById(PersonDaoJpaImpl.java:50)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:301)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy9.findPersonById(Unknown Source)
	at
trial.jpa.services.PersonServiceImpl.findPersonById(PersonServiceImpl.java:36)
	at trial.jpa.clients.MysqlClient.main(MysqlClient.java:18)


What is "This could mean that the OpenJPA enhancer or load-time weaver was
not run on the type whose alias is "person". ". I have configured
SimpleLoadTimeWeaver in springs application context file. 

Any thing else I need to configure
-- 
View this message in context: http://www.nabble.com/org.apache.openjpa.persistence.ArgumentException%3A-Could-not-locate-metadata-for-the-class-using-alias-%22person%22.-This-could-mean-that-the-OpenJPA-enhancer-or-load-time-weaver-was-not-run-on-the-type-whose-alias-tp18100208p18100208.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message