Bug 112675 - No more compilation possible since AJDT 1.3.0.20051012172335 for Eclipse 3.1
Summary: No more compilation possible since AJDT 1.3.0.20051012172335 for Eclipse 3.1
Status: RESOLVED INVALID
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 blocker (vote)
Target Milestone: ---   Edit
Assignee: Adrian Colyer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 112796 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-10-14 13:53 EDT by olivier CLA
Modified: 2005-10-18 10:21 EDT (History)
0 users

See Also:


Attachments
AspectJ plugin Details = package versions (23.65 KB, image/gif)
2005-10-14 14:54 EDT, olivier CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description olivier CLA 2005-10-14 13:53:10 EDT
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
Comment 1 Andrew Clement CLA 2005-10-14 14:13:51 EDT
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?
Comment 2 olivier CLA 2005-10-14 14:54:14 EDT
Created attachment 28306 [details]
AspectJ plugin Details = package versions
Comment 3 olivier CLA 2005-10-14 14:58:11 EDT
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 
Comment 4 olivier CLA 2005-10-17 09:07:42 EDT
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
Comment 5 Sian January CLA 2005-10-18 07:33:30 EDT
*** Bug 112796 has been marked as a duplicate of this bug. ***
Comment 6 Andrew Clement CLA 2005-10-18 07:38:34 EDT
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?
Comment 7 Sian January CLA 2005-10-18 07:58:39 EDT
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.
Comment 8 olivier CLA 2005-10-18 10:18:05 EDT
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
Comment 9 olivier CLA 2005-10-18 10:21:05 EDT
User specific problem