Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 358287 - ASM: ClassCircularityError when attempting to weave class with interface
Summary: ASM: ClassCircularityError when attempting to weave class with interface
Status: CLOSED DUPLICATE of bug 370975
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P2 blocker (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-20 14:40 EDT by James Sutherland CLA
Modified: 2022-06-09 10:30 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James Sutherland CLA 2011-09-20 14:40:18 EDT
A ClassCircularityError can be thrown from ASM when it try to load a class that implements an interface, and has a method that assign the class to the interface.

[EL Warning]: ServerSession(12256734)--Weaver encountered an exception while trying to weave class org/eclipse/persistence/testing/models/jpa/inherited/NodeImpl.  The exception was: java.lang.ClassCircularityError: org/eclipse/persistence/testing/models/jpa/inherited/NodeImpl

We currently trap errors from weaving, so the result is the class is just not weaved and the warning logged.

The code causing the issue is,

Node variable = this;

if this is change to,

Node variable = (Node)(Object)this;

The error seems to go away, very odd.
Seems to be a bug in ASM.
Comment 1 James Sutherland CLA 2011-09-20 14:41:21 EDT
Checking in the test classes for this into the inherited model.

Will log a bug on ASM, fixing the issue may require an upgrade.
Comment 3 James Sutherland CLA 2011-11-07 14:05:42 EST
we repackage asm, so it is our bug, and doesn't matter anyway, our weaving does not work, doesn't matter if a bug in asm is causing it.
Comment 4 Tom Ware CLA 2011-11-09 10:39:50 EST
Setting target and priority.  See the following page for the meanings of these fields:

http://wiki.eclipse.org/EclipseLink/Development/Bugs/Guidelines

Community: Please vote for this bug if it is important to you.  Votes are one of the main criteria we use to determine which bugs to fix next.
Comment 5 Frank Schwarz CLA 2011-12-09 14:53:08 EST
Related?: Bug 314684
Comment 6 James Sutherland CLA 2011-12-19 14:00:38 EST
No, I don't think Bug 314684 is related, that seems to be some kind of OSGi issue.

The ASM bug I logged was closed as not a bug, they don't seem to be willing to fix it, even though it used to work, and now does not.

I saw a user having what appears to be this issue on the forums, and it can basically occur for any reasonable complex piece of code, so I assume we will start seeing this more as people upgrade to 2.3.  We will need to make some kind of workaround for it.
Comment 7 James Sutherland CLA 2012-02-08 14:01:04 EST
This causes the same class to fail to load in JDK 1.7 (deploy will fail).

This is a pretty critical issue, as it could occur in any application, and would require weaving to be turned off.
Comment 8 James Sutherland CLA 2012-02-08 14:01:21 EST
See bug#370975
Comment 9 James Sutherland CLA 2012-02-08 14:04:26 EST
See,

http://www.eclipse.org/forums/index.php/mv/msg/264241/762520/#msg_762520

For a user hitting this error.

The workaround is to disable weaving, or find the offending code in the class (which is not obvious) and remove it.
Comment 10 James Sutherland CLA 2012-02-08 14:05:51 EST
This issue did not occur in EclipseLink 2.0, so was caused by our ASM upgrade in 2.3.
Comment 11 Tom Ware CLA 2012-03-08 13:36:09 EST
Fix for bug 370975 should address this.  Please reopen if you still see the same issue.

*** This bug has been marked as a duplicate of bug 370975 ***
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:30:11 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink