Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355016 - Weaver Throws ClassNotFoundException For Available Classes
Summary: Weaver Throws ClassNotFoundException For Available Classes
Status: CLOSED INVALID
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P2 major (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-17 17:51 EDT by Dave M CLA
Modified: 2022-06-09 10:33 EDT (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dave M CLA 2011-08-17 17:51:13 EDT
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)
Comment 1 Tom Ware CLA 2011-08-23 09:52:32 EDT
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.
Comment 2 Tom Ware CLA 2011-09-09 09:05:03 EDT
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.
Comment 3 Tom Ware CLA 2011-09-22 15:53:59 EDT
Closing as invalid because requested recreation steps have not been provided.  Please reopen if you provide those steps.
Comment 4 David Bernstein CLA 2011-12-01 21:22:24 EST
I have filed bug 365385 which appears very similar to me.
Comment 5 David Bernstein CLA 2011-12-14 15:58:20 EST
If this looks important to you, check out similar bug 365385, which has been accepted for fixing and can be voted for.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:15:31 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 7 Eclipse Webmaster CLA 2022-06-09 10:33:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink