Bug 470663 - AspectJ Internal Compailer Error while saving
Summary: AspectJ Internal Compailer Error while saving
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 8
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-06-21 23:42 EDT by Jason Ridge CLA
Modified: 2015-06-22 11:52 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jason Ridge CLA 2015-06-21 23:42:42 EDT
Project is within STS, using the Spring Framework and Spring Roo. The exception starts to happen after long periods of debugging, writing code, saving etc. 

Note that the project very large in size (in terms of #of files and # of aj files generated by roo). I do not normally see this exception on small simple projects.

Exception reported in dialog:

org.aspectj.weaver.BCException
at org.aspectj.ajdt.internal.core.builder.AjState.recordClassFile(AjState.java:1519)
at org.aspectj.ajdt.internal.core.builder.AjState.noteResult(AjState.java:1325)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager$3.acceptResult(AjBuildManager.java:1066)
at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.afterProcessing(AjPipeliningCompilerAdapter.java:426)
at org.aspectj.ajdt.intern ... es\Java\jdk1.7.0_60\jre\lib\ext\zipfs.jar;C:\dev\ide\sts\sts-bundle\sts-3.6.4.RELEASE\\plugins/org.eclipse.equinox.launcher_1.3.0.v20140415-2008.jar;

Once the exception starts the only solution is to restart eclipse.

Hard to get a project to reproduce - simple projects do not seem to present the error.
Comment 1 Andrew Clement CLA 2015-06-22 11:52:11 EDT
I suspect similar to bug 377096. The problem is that the JDT compiler is recording incorrect attributes in the class file.  Under that bug it was observed that some erroneous annotations can cause incorrect class files to be generated. AspectJ then trips over these because we expect class files to be well formed.

As an example see the spring code in https://bugs.eclipse.org/bugs/show_bug.cgi?id=377096#c14

I think after I raised this as a JDT issue they have worked to improve things, so it could be we just need to pick up those fixes in AspectJ. In the meantime do you have any annotation related errors anywhere?