Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] NoClassDefFoundError: org/aspectj/runtime/internal/CFlowCounter

Hi Philippe!

Thank you very much, appending the aspectjrt.jar to the bootclasspath did indeed solve my problem!

I've also had a look at your research paper and I'll give it a proper read soon, since I'm doing possibly related research. The end-goal of my research is not exactly the JDK weaving; this is more like means to an end. But I'll definitely give the FERRARI framework a look.

Thanks again!

Tiago

2011/3/28 Philippe Moret <philippe.moret@xxxxxxxxx>
Hi!

It might be a classloader issue. I think I had similar issues in the past.
Have you tried to add aspectjrt.jar to the bootclasspath ?  Not sure there is
a good explanation for this, but it has solved some similar problems in the
past. The JDK classes are loaded by the system classloader and for some
reasons it may expect to find the CFlowCounter in the bootclasspath as well.

Philippe

On Monday, March 28, 2011 02:37:31 pm Tiago Espinha wrote:
> Hi all,
>
> I'm back :-) .
>
> In my previous e-mails to the list, I mentioned that I was doing JDK
> weaving and I've been fairly successful with that; that is, until today.
>
> At this point, I have an aspect that I'm weaving into rt.jar and this
> aspect has two pointcuts. The first pointcut is an "auxiliary pointcut" to
> be used in the second pointcut as a cflow() pattern. Then, the second
> pointcut (but not the first) is advised by an around() advice.
>
> In theory, everything should work fine. In fact, if I remove the cflow()
> restriction, everything DOES work fine. The problem is when I add the
> cflow() part, which makes my application start firing these:
>
> -------------8<-------------
> java.lang.NoClassDefFoundError: org/aspectj/runtime/internal/CFlowCounter
> at java.lang.JDKAspect.ajc$preClinit(JDKAspect.aj:1)
> at java.lang.JDKAspect.<clinit>(JDKAspect.aj)
> at
> com.sun.xml.ws.transport.http.HttpAdapter.handle_aroundBody1$advice(HttpAda
> pter.java:14) at
> com.sun.xml.ws.transport.http.HttpAdapter.handle(HttpAdapter.java:1)
> -------------8<-------------
>
> Now, from what I've seen and from past experience, this would be just a
> matter of classpaths, but that does not seem to be the case. I've added the
> aspectjrt.jar to the Tomcat classpath (this is to be used as part of Tomcat
> running in a JVM) and no luck. I still get the same exceptions. It's as if
> the JVM is completely ignoring the aspectjrt.jar and I have absolutely no
> clue why. Obviously, aspectjrt.jar has the CFlowCounter class in there, so
> does anyone have a clue of what might be happening here?
>
> Just to be clear, what I'm trying to do does work without the cflow()
> restriction but I need the cflow() to make it more self-contained, since
> I'm weaving into the JDK.
>
> Thanks in advance!
>
> Tiago
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top