Community
Participate
Working Groups
LTW fails when weaving an external jar with the above error. Attached is a test case containing all required dependencies. Unfortunately I cannot clean up any 3rd party libs, since the bug is only reproducible using the jars in question (LTW on my own classes works just fine). Simply run ant on the supplied build file (using JDK 1.5) to see the exception.
Created attachment 28709 [details] Test case NOTE: Due to attachment size limit you need to add the following to the lib dir: log4j-1.2.8.jar xerces-2.6.2.jar concurrent-1.3.4.jar aspectjrt.jar
Due to attachment size limit you need to add the following to the lib dir: log4j-1.2.8.jar xerces-2.6.2.jar concurrent-1.3.4.jar aspectjrt.jar
may be due to include use (aspect does not go in weaver type munging)
yes it is problem: if goes within weaver, then may apply other aspects to the aspect itself, and we don't want that. Perhaps need to detect that (mustNotWeaveButIsAspect) and then force the munging thru a new BcelPerClauseAspectAdder
done IClassFileProvider.isApplyAtAspectJMungersOnly() and some custom logic in BcelWeaver try to get a next published build and give it a try as a workaround, don't use an <include directive that contains your aspect, or compile the aspect with AJC and not javaC.
Created attachment 61771 [details] test case that throw exception just execute run.sh or run.bat
With annotation i have same error with 1.5.3 version, NoSuchMethodError aspectOf(). I have join script to compile and run in test case. the result is: Exception in thread "main" java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at Test.main(Test.java:40) Caused by: java.lang.NoSuchMethodError: Test$MyTestAspect.aspectOf()LTest$MyTestAspect; at toto.Toto.getToto(Toto.java:5) ... 5 more
LATER/REMIND bugs are being automatically reopened as P5 because the LATER and REMIND resolutions are deprecated.