openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rick Curtis (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OPENJPA-1346) ClassNotFoundException in org.apache.openjpa.datacache.Caches.addTypesByName
Date Wed, 17 Oct 2012 13:40:03 GMT

    [ https://issues.apache.org/jira/browse/OPENJPA-1346?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13477887#comment-13477887
] 

Rick Curtis commented on OPENJPA-1346:
--------------------------------------

Is this something that you would be able to make into a small unit tests?
                
> ClassNotFoundException in org.apache.openjpa.datacache.Caches.addTypesByName
> ----------------------------------------------------------------------------
>
>                 Key: OPENJPA-1346
>                 URL: https://issues.apache.org/jira/browse/OPENJPA-1346
>             Project: OpenJPA
>          Issue Type: Question
>          Components: datacache
>    Affects Versions: 1.1.0
>         Environment: Windows / Oracle Weblogic 10.3.1 (JPA Version: <Starting OpenJPA
1.1.1-SNAPSHOT>)
>            Reporter: Niklas Mehner
>
> This seems to be the same problem as OPENJPA-1093 (only openjpa, not kodo)
> We are getting the following exception in our logfile:
> 5484  lvs-ejb3  WARN   [[ACTIVE] ExecuteThread: '12' for queue: 'weblogic.kernel.Default
(self-tuning)'] openjpa.Runtime - null
> java.lang.ClassNotFoundException: de.evelopment.retail.lvs.ejb.stammdaten.BoxBean
>         at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
>         at java.security.AccessController.doPrivileged(Native Method)
>         at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
>         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
>         at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
>         at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
>         at java.lang.Class.forName0(Native Method)
>         at java.lang.Class.forName(Class.java:247)
>         at org.apache.openjpa.datacache.Caches.addTypesByName(Caches.java:48)
>         at org.apache.openjpa.datacache.AbstractQueryCache.afterCommit(AbstractQueryCache.java:198)
>         at org.apache.openjpa.event.RemoteCommitEventManager.fireEvent(RemoteCommitEventManager.java:132)
>         at org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager.fireEvent(AbstractConcurrentEventManager.java:115)
>         at org.apache.openjpa.event.AbstractRemoteCommitProvider.fireEvent(AbstractRemoteCommitProvider.java:63)
>         at org.apache.openjpa.event.SingleJVMRemoteCommitProvider.broadcast(SingleJVMRemoteCommitProvider.java:58)
>         at org.apache.openjpa.event.RemoteCommitEventManager.afterCommit(RemoteCommitEventManager.java:156)
>         at org.apache.openjpa.event.TransactionEventManager.fireEvent(TransactionEventManager.java:107)
>         at org.apache.openjpa.lib.util.concurrent.AbstractConcurrentEventManager.fireEvent(AbstractConcurrentEventManager.java:115)
>         at org.apache.openjpa.kernel.BrokerImpl.fireTransactionEvent(BrokerImpl.java:757)
>         at org.apache.openjpa.kernel.BrokerImpl.endTransaction(BrokerImpl.java:2200)
>         at org.apache.openjpa.kernel.BrokerImpl.afterCompletion(BrokerImpl.java:1846)
>         at weblogic.transaction.internal.ServerSCInfo.doAfterCompletion(ServerSCInfo.java:1038)
>         at weblogic.transaction.internal.ServerSCInfo.callAfterCompletions(ServerSCInfo.java:1014)
>         at weblogic.transaction.internal.ServerTransactionImpl.callAfterCompletions(ServerTransactionImpl.java:2998)
>         at weblogic.transaction.internal.ServerTransactionImpl.afterCommittedStateHousekeeping(ServerTransactionImpl.java:2898)
>         at weblogic.transaction.internal.ServerTransactionImpl.setCommitted(ServerTransactionImpl.java:2943)
>         at weblogic.transaction.internal.ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2733)
>         at weblogic.transaction.internal.ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2653)
>         at weblogic.transaction.internal.ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:285)
>         at weblogic.transaction.internal.ServerTransactionImpl.commit(ServerTransactionImpl.java:233)
>         at weblogic.ejb.container.internal.BaseRemoteObject.postInvoke1(BaseRemoteObject.java:621)
>         at weblogic.ejb.container.internal.StatelessRemoteObject.postInvoke1(StatelessRemoteObject.java:60)
>         at weblogic.ejb.container.internal.BaseRemoteObject.postInvokeTxRetry(BaseRemoteObject.java:441)
> where de.evelopment.retail.lvs.ejb.stammdaten.BoxBean is an entity bean. 
> I think the problem is that openjpa uses Class.forName(..) instead of Thread.currentThread().getContextClassLoader().loadClass(...)
to load the class.
> openJPA is loaded by the system classloader, while the class is from the ear-classloader,
so Class.forName(..) cannot work.
> the properties used in persistence.xml are:
>   <properties>
>      	<property name="openjpa.DetachState" value="fetch-groups(DetachedStateField=true)"/>
>      	<property name="openjpa.DataCache" value="true"/>
>         <property name="openjpa.RemoteCommitProvider" value="sjvm"/>     	
>      </properties>
> Can we ignore this problem or can this cause real problems (I do not care all that much
if caching is not working for this class, but I don't want any data corruption)?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message