Community
Participate
Working Groups
I have this error appearing systematically blocking the build process and I am not able to detect the origin. java.lang.NoSuchMethodError at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:615) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:204) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:151) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:122) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191) NoSuchMethodError thrown: org.aspectj.weaver.bcel.BcelWeaver.setReweavableMode(Z)V
In recent AJDT builds the plugins have further split... the org.aspectj.ajde plugin used to contain the compiler and the weaver, it now contains just the compiler and the new org.aspectj.weaver plugin contains the weaver. Looking at your error it seems you are using ajde.jar but not the corresponding weaver.jar. Since AjBuildManager is in ajde.jar and BcelWeaver is in the weaver.jar How is your build process constructed? Is it ANT, if so whats the classpath you are using? Does it include the weaver jar if you are using the plugin jars rather than aspectjtools from the 1.5.0M4 installation of aspectj?
Created attachment 28306 [details] AspectJ plugin Details = package versions
I do not use ant but the default aspectj plugin builder. All my current projects refer to aspectj libraries matching with the last version (version details were recently attached to this bug report) Thanks
I tried with last build of ajdt and nothing better. I also tried to use the last build of aspectj (aspectjtool for ajde.jar, aspectjrt.jar and aspectweaver.jar) and neither it helps. Thanks for helping me in solving this boring problem. eclipse.buildId=M20050929-0840 java.version=1.5.0_02 java.vendor=Apple Computer, Inc. BootLoader constants: OS=macosx, ARCH=ppc, WS=carbon, NL=en_US Framework arguments: -keyring /Users/omotelet/.eclipse_keyring -showlocation Command-line arguments: -os macosx -ws carbon -arch ppc -keyring /Users/ omotelet/.eclipse_keyring -consoleLog -showlocation
*** Bug 112796 has been marked as a duplicate of this bug. ***
Using aspectjtools.jar as a replacement for ajde/weaver/runtime is dangerous - you will be lucky if anything works if you do that since the jars in those plugins are careful subsets of the contents of aspectjtools. With the change to make reweavable default the signature for BcelWeaver.setReweavableMode() changed from: public void setReweavableMode(boolean mode,boolean compress) to public void setReweavableMode(boolean xNotReweavable) Your version of AjBuildManager.initBcelWorld() is calling the new version of setReweavableMode (which takes just a boolean) but it looks like you may be running with an old version of the weaver jar. Have you ever copied any part of AspectJ into the standard extensions folder of your VM - such that it will be found ahead of the version in the plugins? Any version of aspectjtools lying around could have the old version of this class in which is missing the form of setReweavableMode that you need. Can you go into the weaver plugin and javap org.aspectj.weaver.bcel.BcelWeaver and check what version of setReweavableMode is reported. Have you got another level of the VM you can try?
Hi Oliver - I have OS X 10.4.2 and Eclipse 3.1.1 with several projects in the workspace. I just upgraded from AJDT 1.3.0.20051012.. to 1.3.0.20051017.. without any problems. If you did something unusual when you upgraded it might be worth trying to upgrade again to the latest version and see if that works for you.
Effectively Eclipse was using 2 version of aspectj. The other one was dated from the day I updated to 3.1.1. I do not know what occured then. I reinstall all and now it works ok. Thanks a lot for your help and your great work! Olivier
User specific problem