Bug 175387 - Unable to build AspectJ Java application on Eclipse/Ant: org.aspectj.weaver.BCException
Summary: Unable to build AspectJ Java application on Eclipse/Ant: org.aspectj.weaver.B...
Status: RESOLVED WONTFIX
Alias: None
Product: AspectJ
Classification: Tools
Component: Build (show other bugs)
Version: 1.5.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 1.5.4   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-23 17:26 EST by Vishal CLA
Modified: 2007-10-26 06:38 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 Vishal CLA 2007-02-23 17:26:38 EST
org.aspectj.weaver.BCException
at org.aspectj.weaver.AjAttribute.read(AjAttribute.java:127)
at org.aspectj.weaver.asm.AjASMAttribute.unpack(AjASMAttribute.java:60)
at org.aspectj.weaver.asm.AsmDelegate.getWeaverState(AsmDelegate.java:304)
at org.aspectj.weaver.ReferenceType.getWeaverState(ReferenceType.java:368)
at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:536)
at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:519)
at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1058)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.createBinaryTypeFrom(LookupEnvironment.java:480)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.accept(Compiler.java:190)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.LookupEnvironment.askForType(LookupEnvironment.java:137)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.PackageBinding.getTypeOrPackage(PackageBinding.java:178)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findImport(CompilationUnitScope.java:413)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.findSingleImport(CompilationUnitScope.java:466)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInImports(CompilationUnitScope.java:331)
at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.CompilationUnitScope.faultInTypes(CompilationUnitScope.java:400)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:512)
at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:887)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:244)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:163)
at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:122)
at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)

BCException thrown: malformed org.aspectj.weaver.WeaverState attribute java.io.EOFException
when weaving intertype declarations ExtensionOwner
when processing compilation unit C:\CVSDir\CF_Umbrella\Code\source\com\crum\policyAdmin\business\KYTaxRateCalculator.java
when batch building BuildConfig[C:\Documents and Settings\vmataxt\workspace\.metadata\.plugins\org.eclipse.ajdt.core\Umbrella.generated.lst] #Files=578
Comment 1 Andrew Clement CLA 2007-02-26 04:12:51 EST
this bug suggests you are building an aspect with one level of aspectj then processing it with another sometime later?  Can you tell me - are you using an aspect library?  Definetly using the same level of AspectJ throughout your process?  
Comment 2 Vishal CLA 2007-02-26 11:16:55 EST
(In reply to comment #1)
> this bug suggests you are building an aspect with one level of aspectj then
> processing it with another sometime later?  Can you tell me - are you using an
> aspect library?  Definetly using the same level of AspectJ throughout your
> process?  

Andy,

I have used the following AJDT for Eclipse:
Update Site URL: http://download.eclipse.org/tools/ajdt/32/update 
Zip file: ajdt_1.4.1_for_eclipse_3.2.zip 

I have a set of framework classes that might have been compiled using a previous version. If that's the case, what should be my next step? Are AJDT versions not backword compatible?

-Vishal
Comment 3 Andrew Clement CLA 2007-10-26 06:38:36 EDT
sorry. taken me ages to reply on this.

AJDT is backwards compatible.  Compilation of an aspect with version X will be consumed correctly by version X+1, X+2, etc.  What won't work is compilation of an aspect with version X and then weaving with version X-1.  When that happens we get exceptions like the one shown here.

Because it has been open so long, I imagine you've gotten past this by now so am going to close the bug.  if you still want me to get to the bottom of it, please feel free to reopen it.