Sorry Holger,
Two of us on this thread having the same problem. I have it with a simple empty
application-main, and Hermod has it with Websphere.
In my case, I have a simple application-main, which does nothing, imports
nothing, and simply uses an empty woven class. Literally, here is my test case:
# ----------------------------- THIS GETS WOVEN
public class Foo {
public static void calc() {
} // <<< NoClassDefFoundError is trapped here!
}
# ----------------------------- THIS DOES NOT GET WOVEN
public class Test {
public static void main(String[] args) {
Foo.calc();
}
}
# -----------------------------
NOTE: Putting breakpoints on all NoClassDefFoundError instances in the
debugger, the error gets trapped at the end of Foo.calc, and NOT in
application-main. The only interesting difference between the two classes is
that Foo is woven.
Can't get much simpler than that.
/Bob
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Holger Hoffstätte
Sent: Wednesday, July 02, 2008 7:45 AM
To: [email protected]
Subject: Re: [aspectj-users]Exception
inthread"main"java.lang.NoClassDefFoundError
Robert,
I saw that the error originates from commons-logging. I remember vaguely that
Websphere has a bundled version of commons-logging - is that true? It might be
the case that the container's class loading of clogging conflicts with LTW's
idea of a class hierarchy. Try to switch to parent-last classloading or
alternatively replace the container's commons-logging with slf4j (you'll need
jcl-over-slf for the clogging interfaces, slf4j-api for the slf4j interfaces
and slf4j-log4j for the backend). The jcl-over-slf intrefaces are
binary-compatible with clogging but the implementation exhibts less "dynamic"
(read: often failing) behaviour at runtime.
Holger
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users