Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AspectJ » ClassCircularityError
ClassCircularityError [message #659896] Tue, 15 March 2011 23:49 Go to next message
Celal is currently offline CelalFriend
Messages: 7
Registered: March 2011
Junior Member
Hi,
I'm trying to do something extremely simple: trace execution of methods with an aspect and log the method signatures.
However, when I run this, below is what I get:

java.lang.ClassCircularityError: org/junit/internal/runners/model/MultipleFailureException
at org.junit.internal.runners.model.EachTestNotifier.addFailure (EachTestNotifier.java:23)
at org.junit.runners.ParentRunner.run(ParentRunner.java:242)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.r un(JUnit4TestReference.java:49)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(Test Execution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTe sts(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(R emoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:197)
Exception in thread "main" java.lang.ClassCircularityError: org/aspectj/runtime/reflect/StringMaker
at org.aspectj.runtime.reflect.SignatureImpl.toString(Signature Impl.java:62)
at edu.ucsd.tracecollector.aspect.MethodTracerAspect.printMetho dSignature(MethodTracerAspect.java:70)
at tests.milestone1.ClientTests$NoExitSecurityManager.checkExit (ClientTests.java:242)
at java.lang.Runtime.exit(Unknown Source)
at java.lang.System.exit(Unknown Source)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main( RemoteTestRunner.java:202)

I use java.util.logging, and aspectj 1.6.11.
I also tried using slf4j as logging api, and log4j/slf4j-simple as logging backend, and the same issue every time.

Is there anyone who has successfully used logging with aspectj before? I thought I was doing the simplest thing, but seems like not.
I am slowly and sadly losing faith in aspectj...
Re: ClassCircularityError [message #659897 is a reply to message #659896] Tue, 15 March 2011 23:50 Go to previous messageGo to next message
Celal is currently offline CelalFriend
Messages: 7
Registered: March 2011
Junior Member
And here is what my weaver looks like:

<weaver options="">
<exclude within="org.junit..*"/>
<exclude within="junit.framework..*"/>
<exclude within="org.eclipse.jdt..*"/>
<exclude within="org.aspectj..*"/>
<exclude within="org.slf4j..*"/>
</weaver>

and I have "!within(MethodTracerAspect)" in my pointcuts.
Re: ClassCircularityError [message #659901 is a reply to message #659897] Wed, 16 March 2011 00:41 Go to previous messageGo to next message
Celal is currently offline CelalFriend
Messages: 7
Registered: March 2011
Junior Member
OK, I found one line in my codebase, if commented out, everything works without any issues:

>> System.setSecurityManager(new NoExitSecurityManager());

I have no idea why and how, but everything works without this line, go figure Smile
Re: ClassCircularityError [message #660074 is a reply to message #659901] Wed, 16 March 2011 18:02 Go to previous message
Andrew Eisenberg is currently offline Andrew EisenbergFriend
Messages: 382
Registered: July 2009
Senior Member
Hard to say exactly what was/is going on here. However, I'd also recommend that you include

&& ! cflow(adviceexcecution()) 


to all of your pointcuts (unless of course you want to advise code called from inside advice).
Previous Topic:weaving java and javax classes
Next Topic:If I use inter-type declarations should I use only compile-time weaving? (ajc compiler)
Goto Forum:
  


Current Time: Fri Apr 26 14:43:21 GMT 2024

Powered by FUDForum. Page generated in 0.04569 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top