Summary: | LTW and AspectOf() NoSuchMethodError | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Yoav Landman <yoavl> | ||||||
Component: | Compiler | Assignee: | Alexandre Vasseur <avasseur> | ||||||
Status: | REOPENED --- | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P5 | CC: | poussin | ||||||
Version: | 1.5.0M4 | ||||||||
Target Milestone: | 1.5.0RC1 | ||||||||
Hardware: | All | ||||||||
OS: | All | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Yoav Landman
2005-10-24 15:59:45 EDT
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. |