openjpa-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From krishnadas <krishnadasa...@geojit.com>
Subject Citical error:org.apache.openjpa.persistence.ArgumentException: Could not locate metadata for the class using alias
Date Tue, 13 Nov 2007 09:18:55 GMT

hi folks,

        I am getting a strange error from application(which is in
production) when accessing Namedqueries using kodo in bea weblogic 10.I am
also using Spring and using ApplicationLifecycleListener of bea for
initializing my application since i am not using any session bean or
mdbs.The interesting thing is this error happens once in a while.it works
fine most of the time but sometime it fails.Then after one or two restarting
of server will solve the problem.There is no problem when accessing entities
by using em.find.it only effect named queries.And another thing i noticed is
we added two three entities to the existing application (On Development
build) related to new features.now this error is happening more frequently.
>From lot of searching  i came to a conclusion that it is related to a class
loading and also related to spring.i am not using any load-time weaver in my
application.Can anybody help me in this case.I am giving the details below.I
am waiting for a reply.........

regards 
krishnadas

----------------------------------------

Persistance.xml

<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd">
  <persistence-unit name="OMSPU" transaction-type="JTA">
     <provider>kodo.persistence.PersistenceProviderImpl</provider>
    <jta-data-source>OMSPP</jta-data-source>
    <class>com.git.oms.common.entity.Users</class>
    <class>com.git.oms.common.entity.UserRoles</class>
    <class>com.git.oms.common.entity.UserSession</class>
    <class>com.git.oms.common.entity.UserVenueMembership</class>
    <class>com.git.oms.common.entity.UserSessionPK</class>
    <class>com.git.oms.common.entity.UserVenueMembershipPK</class>
    <class>com.git.oms.common.entity.Security</class>
    <class>com.git.oms.common.entity.SecurityPK</class>
    <class>com.git.oms.common.entity.Ord</class>
    <class>com.git.oms.common.entity.OrdPK</class>
    <class>com.git.oms.common.entity.ORDRequest</class>
    <class>com.git.oms.common.entity.ORDRequestLog</class>
    <class>com.git.oms.common.entity.ORDReply</class>
    <class>com.git.oms.common.entity.ORDReplyLog</class>
    <class>com.git.oms.common.entity.OrphanExecution</class>
    <class>com.git.oms.common.entity.Portfolio</class>
    <class>com.git.oms.common.entity.PortfolioPK</class>
    <class>com.git.oms.common.entity.PortfolioUnsettled</class>
    <class>com.git.oms.common.entity.PortfolioUnsettledPK</class>
    <class>com.git.oms.common.entity.SessionHistory</class>
    <class>com.git.oms.common.entity.UserAccount</class>
    <class>com.git.oms.common.entity.UserAccountPK</class>
    <class>com.git.oms.common.entity.Omsmessage</class>
    <class>com.git.oms.common.entity.OmsmessagePK</class>
    <class>com.git.oms.common.entity.Fileversion</class>
    <class>com.git.oms.common.entity.FileversionPK</class>
  
    <properties>
    
      <property name="kodo.DataCache" value="lru(CacheSize=10000,
SoftReferenceSize=0)"/>
    
      <property name="kodo.RemoteCommitProvider" value="sjvm"/>
     <property name="kodo.Multithreaded" value="true"/>
    
      <property name=" kodo.conf.KodoConfiguration.getRetainState"
value="true"/>
      <property name="kodo.Log" value="DefaultLevel=TRACE,  Runtime=TRACE,
Tool=TRACE, SQL=TRACE, MetaData=TRACE" />
     
      
    
    </properties>
  </persistence-unit>
</persistence>



------------------------------------

Spring Configuration 

--------------------------------------

 <bean id="entityManagerFactory"  
class="org.springframework.orm.jpa.LocalEntityManagerFactoryBean" />
     <bean
class="org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor"/> 
	  <bean id="transactionManager" 
class="org.springframework.transaction.jta.WebLogicJtaTransactionManager">
  <property name="transactionManagerName"
value="javax.transaction.TransactionManager"/> 
  </bean>
<aop:config proxy-target-class="true"/>
  <tx:annotation-driven />

---------------------------------------------------------------------------------

Exception
--------------------------------------------------------------------------------


 processor.LoginProcess:512 -       Unknown Exception  occured in
Authentication Process 
<4|true|0.9.7> org.apache.openjpa.persistence.ArgumentException: Could not
locate metadata for the class using alias "UserVenueMembership". Registered
alias mappings: "{Omsmessage=null, Ord=null, UserVenueMembership=null}"
	at
org.apache.openjpa.meta.MetaDataRepository.getMetaData(MetaDataRepository.java:345)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.getClassMetaData(JPQLExpressionBuilder.java:164)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder.resolveClassMetaData(JPQLExpressionBuilder.java:142)
	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$500(JPQLExpressionBuilder.java:61)
	at
org.apache.openjpa.kernel.jpql.JPQLExpressionBuilder$ParsedJPQL.populate(JPQLExpressionBuilder.java:1668)
	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.datacache.QueryCacheStoreQuery.populateFromCompilation(QueryCacheStoreQuery.java:237)
	at org.apache.openjpa.kernel.QueryImpl.newCompilation(QueryImpl.java:644)
	at
org.apache.openjpa.kernel.QueryImpl.compilationFromCache(QueryImpl.java:625)
	at
org.apache.openjpa.kernel.QueryImpl.compileForCompilation(QueryImpl.java:591)
	at
org.apache.openjpa.kernel.QueryImpl.compileForExecutor(QueryImpl.java:653)
	at org.apache.openjpa.kernel.QueryImpl.compile(QueryImpl.java:560)
	at kodo.kernel.KodoQuery.compile(KodoQuery.java:75)
	at
org.apache.openjpa.persistence.EntityManagerImpl.createNamedQuery(EntityManagerImpl.java:785)
	at
kodo.persistence.KodoEntityManagerImpl.createNamedQuery(KodoEntityManagerImpl.java:68)
	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.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:340)
	at $Proxy88.createNamedQuery(Unknown Source)
	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.orm.jpa.SharedEntityManagerCreator$SharedEntityManagerInvocationHandler.invoke(SharedEntityManagerCreator.java:180)
	at $Proxy86.createNamedQuery(Unknown Source)
	at
com.git.oms.as.dao.UserDAOImpl.getUserVenueMemberships(UserDAOImpl.java:59)
	at com.git.oms.as.processor.LoginProcess.execute(LoginProcess.java:371)
	at
com.git.oms.framework.processor.OMSBusinessProcessManager.startProcess(OMSBusinessProcessManager.java:72)
	at
com.git.oms.as.processor.LoginProcessManager.startProcess(LoginProcessManager.java:36)
	at
com.git.oms.as.controller.LoginController.processRequest(LoginController.java:117)
	at
com.git.oms.as.controller.LoginController$$FastClassByCGLIB$$b582410d.invoke(<generated>)
	at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
	at
org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:695)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:139)
	at
org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:107)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:161)
	at
org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:630)
	at
com.git.oms.as.controller.LoginController$$EnhancerByCGLIB$$e477a901.processRequest(<generated>)
	at
com.git.oms.as.message.AsRVMessageListener.onMsg(AsRVMessageListener.java:364)
	at com.tibco.tibrv.TibrvEvent.invoke(TibrvEvent.java:160)
	at com.tibco.tibrv.TibrvImplQueueC.natDispatch(Native Method)
	at com.tibco.tibrv.TibrvImplQueueC.dispatch(TibrvImplQueueC.java:44)
	at com.tibco.tibrv.TibrvQueue.dispatch(TibrvQueue.java:301)
	at com.tibco.tibrv.TibrvDispatcher.run(TibrvDispatcher.java:169)





-- 
View this message in context: http://www.nabble.com/Citical-error%3Aorg.apache.openjpa.persistence.ArgumentException%3A-Could-not-locate-metadata-for-the-class-using-alias-tf4796620.html#a13722281
Sent from the OpenJPA Users mailing list archive at Nabble.com.


Mime
View raw message