Getting ClassNotFoundException, when using JPA cache with more than one application. (Doc ID 1313222.1)

Last updated on MAY 05, 2013

Applies to:

Oracle Weblogic Server - Version 10.3.3 and later
Information in this document applies to any platform.
***Checked for relevance on 6-May-2013***

Symptoms

ClassNotFoundException is thrown when using same JPA cache with more than one app as below.
Added the below attributes in persistence.xml file to enable cache:

<properties>
<property name="openjpa.DataCache" value="true,true(Name=secondary-cache, CacheSize=100)"/>
<property name="openjpa.RemoteCommitProvider" value="sjvm" />

</properties>


This is working fine with one application.
Once we deploy second JPA application with above properties we are seeing below exception.

<Feb 13, 2011 3:29:32 PM EST> <Warning> <Kodo> <BEA-2004002> <null java.lang.ClassNotFoundException: com.oracle.jpa.example.Customer
at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericClassLoader.java:280)
at weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLoader.java:253)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at weblogic.utils.classloaders.GenericClassLoader.loadClass(GenericClassLoader.java:177)

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms