Bug 197472 - Runtime exception happened when a file is saved and automatica build of aspectJ file is compiled
Summary: Runtime exception happened when a file is saved and automatica build of aspe...
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 major with 1 vote (vote)
Target Milestone: 1.6.0 RC1   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 197473 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-23 07:16 EDT by Srini Palthepu CLA
Modified: 2008-03-14 15:29 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Srini Palthepu CLA 2007-07-23 07:16:10 EDT
Runtime exception happened when  a file is saved and automatica build of aspectJ file is compiled.


java.lang.RuntimeException
at org.aspectj.weaver.WeaverStateInfo.read(WeaverStateInfo.java:142)
at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:97)
at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:66)
at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:312)
at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:142)
at org.aspectj.weaver.bcel. ... BuildJob.java:217)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:58)

Compile error: RuntimeException thrown: bad WeaverState.Kind: -115
Comment 1 Andrew Clement CLA 2007-10-26 08:15:15 EDT
really need more information... what kind of project is it? does it have external jars it depends on? do those external jars contain aspects?  Which version of AJDT are you using, which aspectj level?  What kind of file where you editing and saving? a resource, a regular class, an aspect?
Comment 2 Andrew Clement CLA 2007-10-26 08:16:28 EDT
*** Bug 197473 has been marked as a duplicate of this bug. ***
Comment 3 Jason Naylor CLA 2007-12-12 12:11:15 EST
I have encountered the same exception:
---------------------------
java.lang.RuntimeException
at org.aspectj.weaver.WeaverStateInfo.read(WeaverStateInfo.java:142)
at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:97)
at org.aspectj.weaver.bcel.BcelAttributes.readAjAttributes(BcelAttributes.java:66)
at org.aspectj.weaver.bcel.BcelObjectType.ensureAspectJAttributesUnpacked(BcelObjectType.java:312)
at org.aspectj.weaver.bcel.BcelObjectType.<init>(BcelObjectType.java:142)
at org.aspectj.weaver.bcel. ... BuildJob.java:235)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Compile error: RuntimeException thrown: bad WeaverState.Kind: -115
--------------------------

I have the following setup
OS: Windows XP SP2
Eclipse Version: 3.3.0, Build ID: I20070625-1500
AJDT Version: 1.5.0.200706070619
AspectJ Version: 1.5.4.200705211336

I created 4 projects:
1 Java project which uses 2 AspectJ projects TestOne, and TestTwo without any aspects.
1 additional AspectJ project TestThree which has an aspect affecting the other two AspectJ projects.  The inpath for TestThree has both TestOne and TestTwo class folders, and TestTwo has an inpath entry for the class folder of TestThree.  
Comment 4 Andrew Clement CLA 2008-02-11 09:08:16 EST
Finally had a bit of time to look through some old AspectJ bugs.  Anyone still seeing this should update to the most recent AJDT that includes the final release of AspectJ1.5.4 (or you can try a dev build of AJDT that includes AspectJ1.6.0 builds).  If it still happens for you, I have just committed a change that will tell us which file is leading to the exception, so I could put that in an AJDT dev build for us to investigate further.
Comment 5 Andrew Clement CLA 2008-03-14 15:29:01 EDT
AJDT now includes the extra debug info that will tell us which file leads to this problem.  it was originally seen before AspectJ1.5.4 was final, which was a while ago - so could have been addressed by the many changes since it was seen.  I'll close this now, please reopen if seen again and include the extra debug information that comes out.