Community
Participate
Working Groups
We are seeing the EclipseLink 2.3.0 weaver (static and dynamic) throw ClassNotFoundExceptions for classes that are provably available to be class laoded. As the weaver log output below shows, the ClassNotFoundException for the class com.ios.domain.EntityOne occurs immediately after the weaver finished processing the com.ios.doamin.EntityOne class - which it presumably had to have loaded to do its weaving. I'm pretty sure that the weaver uses a temporary class loader, so perhaps that factors into this problem. We have tried weaving in place and not, weaving jar files and directory structures. We have tried invoking the weaver using the regular eclipselink.jar as well as the OSGI bundles (in both static and dynamic mode), with and without Gemini JPA, etc. The same error occurs in all cases. [EL Finest]: 2011-08-16 12:57:34.034--ServerSession(1068678007)--Thread(Thread[main,5,main])--Begin weaver class transformer processing class [com/ios/domain/EntityOne]. [EL Finest]: 2011-08-16 12:57:34.036--ServerSession(1068678007)--Thread(Thread[main,5,main])--End weaver class transformer processing class [com/ios/doamin/EntityOne]. [EL Finest]: 2011-08-16 12:57:34.037--ServerSession(1068678007)--Thread(Thread[main,5,main])--Begin weaver class transformer processing class [com/ios/domain/EntityTwo]. [EL Warning]: 2011-08-16 12:57:34.039--ServerSession(1068678007)--Thread(Thread[main,5,main])--Weaver encountered an exception while trying to weave class com/ios/domain/EntityTwo. The exception was: java.lang.RuntimeException: java.lang.ClassNotFoundException: com.ios.domain.EntityOne [EL Finest]: 2011-08-16 12:57:34.04--ServerSession(1068678007)--Thread(Thread[main,5,main])--java.lang.RuntimeException: java.lang.ClassNotFoundException: com.ios.domain.EntityOne at org.eclipse.persistence.internal.libraries.asm.ClassWriter.getCommonSuperClass(Unknown Source) at org.eclipse.persistence.internal.libraries.asm.ClassWriter.getMergedType(Unknown Source) at org.eclipse.persistence.internal.libraries.asm.Frame.merge(Unknown Source) at org.eclipse.persistence.internal.libraries.asm.Frame.merge(Unknown Source) at org.eclipse.persistence.internal.libraries.asm.MethodWriter.visitMaxs(Unknown Source) at org.eclipse.persistence.internal.libraries.asm.MethodAdapter.visitMaxs(Unknown Source) at org.eclipse.persistence.internal.jpa.weaving.MethodWeaver.visitMaxs(MethodWeaver.java:152) at org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(Unknown Source) at org.eclipse.persistence.internal.libraries.asm.ClassReader.accept(Unknown Source) at org.eclipse.persistence.internal.jpa.weaving.PersistenceWeaver.transform(PersistenceWeaver.java:93) at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveClassTransformer.transform(StaticWeaveClassTransformer.java:86) at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.process(StaticWeaveProcessor.java:312) at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveProcessor.performWeaving(StaticWeaveProcessor.java:174) at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.start(StaticWeaveAntTask.java:215) at org.eclipse.persistence.tools.weaving.jpa.StaticWeaveAntTask.execute(StaticWeaveAntTask.java:177) at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) at org.apache.tools.ant.Task.perform(Task.java:348) at org.apache.tools.ant.Target.execute(Target.java:390) at org.apache.tools.ant.Target.performTasks(Target.java:411) at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) at org.apache.tools.ant.Project.executeTarget(Project.java:1368) at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) at org.apache.tools.ant.Project.executeTargets(Project.java:1251) at org.apache.tools.ant.Main.runBuild(Main.java:809) at org.apache.tools.ant.Main.startAnt(Main.java:217) at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109)
Is it possible to provide the persistence unit that causes the problem? If not, please provide as much detail as you can about what entities are in the persistence unit and how they are mapped.
Targetting for 2.3.1. If, however, instructions to recreate this problem are not made available by the time 2.3.1 closes, I will have to close this as INVALID.
Closing as invalid because requested recreation steps have not been provided. Please reopen if you provide those steps.
I have filed bug 365385 which appears very similar to me.
If this looks important to you, check out similar bug 365385, which has been accepted for fixing and can be voted for.
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink