openjpa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Zheng (JIRA)" <>
Subject [jira] Commented: (OPENJPA-600) java.lang.NoClassDefFoundError is thrown when using JRocket and application-provided OpenJPA jars
Date Tue, 13 May 2008 18:59:55 GMT


Jason Zheng commented on OPENJPA-600:

The patch, OPENJPA-600.txt,  is based on:

version id: openjpa-1.1.0-SNAPSHOT-r422266:653176M


> java.lang.NoClassDefFoundError is thrown when using JRocket and application-provided
OpenJPA jars
> -------------------------------------------------------------------------------------------------
>                 Key: OPENJPA-600
>                 URL:
>             Project: OpenJPA
>          Issue Type: Bug
>          Components: kernel
>    Affects Versions: 1.1.0
>         Environment: Runtime enhancement in combination with a pure-JIT JVM such as JRocket
>            Reporter: Jason Zheng
>         Attachments: OPENJPA-600.txt
> Customers want to use a version of OpenJPA in their applications other than the version
bundled with WebLogic. It enables customers to use an upgraded version of OpenJPA than is
shipped with the product. 
> The customer's application would have openjpa.jar and kodo.jar in its lib or APP-INF/lib
directory, and use the filtering classloader to filter out org.apache.openjpa.*, com.solarmetric.*
and kodo.*.
> When I deploy a sample application with embedded openjpa.jar to weblogic server, the
following exception is thrown during deployment:
> java.lang.NoClassDefFoundError: org/apache/openjpa/enhance/PCEnhancer
> 	at org.apache.openjpa.enhance.PCClassFileTransformer.transform(
> 	at org.apache.openjpa.persistence.PersistenceProviderImpl$ClassTransformerImpl.transform(
> 	at weblogic.deployment.PersistenceUnitInfoImpl$ClassPreProcessorImpl.preProcess(
> 	at weblogic.utils.classloaders.ClassPreProcessor$ClassPreProcessorSupport.preProcess(
> 	at weblogic.utils.classloaders.GenericClassLoader.doPreProcess(
> 	at weblogic.utils.classloaders.GenericClassLoader.defineClass(
> 	at weblogic.utils.classloaders.GenericClassLoader.findLocalClass(
> 	at weblogic.utils.classloaders.GenericClassLoader.findClass(
> 	at java.lang.ClassLoader.loadClass(
> 	at java.lang.ClassLoader.loadClass(
> 	at weblogic.utils.classloaders.GenericClassLoader.loadClass(
> 	at java.lang.Class.getDeclaredMethods0(Native Method)
> 	at java.lang.Class.privateGetDeclaredMethods(
> 	at java.lang.Class.privateGetPublicMethods(
> 	at java.lang.Class.getMethods(
> 	at weblogic.ejb.container.ejbc.VersionHelperImpl.computeCRC(
> 	at weblogic.ejb.container.ejbc.VersionHelperImpl.makeFileHash(
> 	at weblogic.ejb.container.ejbc.VersionHelperImpl.<init>(
> 	at weblogic.ejb.container.deployer.EJBDeployer.compileIfNecessary(
> 	at weblogic.ejb.container.deployer.EJBDeployer.prepare(
> 	at weblogic.ejb.container.deployer.EJBModule.prepare(
> 	at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(
> 	at weblogic.application.internal.flow.DeploymentCallbackFlow$
> 	at weblogic.application.utils.StateMachineDriver$ParallelChange$
> 	at
> 	at Source)
> 	at weblogic.application.utils.StateMachineDriver$
> 	at
> Note this error happens in pure-JIT JVM such as JRocket only, not with the interpreting
JVMs (for instance HotSpot).
> The error is because the tranformer plugin in openjpa makes a faulty assumption (which
happens to work on interpreters), that types can be 
> resolved during execution of a method. Read up on the VM/lanf spec, it clearly states
that you may not make such an assumption. Thus, while it might work with the reference, the
preprocessor is quite broken.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message