Bug 553840 - Error while compiling the gradle project - Exception thrown from AspectJ
Summary: Error while compiling the gradle project - Exception thrown from AspectJ
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: IDE (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 10
: P3 minor (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-12-05 15:40 EST by Joseph Varghese CLA
Modified: 2020-04-21 00:50 EDT (History)
1 user (show)

See Also:


Attachments
Error dialog in Eclipse workspace while trying to build the gradle project (103.94 KB, image/jpeg)
2019-12-05 15:44 EST, Joseph Varghese CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Varghese CLA 2019-12-05 15:40:39 EST
Error while compiling the gradle project - Exception thrown from AspectJ

org.aspectj.apache.bcel.classfile.ClassFormatException
at org.aspectj.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:192)
at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:131)
at org.aspectj.weaver.bcel.BcelWeaver.addAspectsFromJarFile(BcelWeaver.java:263)
at org.aspectj.weaver.bcel.BcelWeaver.addLibraryJarFile(BcelWeaver.java:239)
at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initB ... ternal.jobs.Worker.run(Worker.java:56)

Compile error: ClassFormatException thrown: File: 'module-info.class': Invalid byte tag in constant pool: 19
Comment 1 Joseph Varghese CLA 2019-12-05 15:44:00 EST
Created attachment 280883 [details]
Error dialog in Eclipse workspace while trying to build the gradle project
Comment 2 Andrew Clement CLA 2019-12-05 17:20:23 EST
Which AJDT are you using?  Is it the one from http://download.eclipse.org/tools/ajdt/410/dev/update ?

And what version of Java is the project you are working on? It looks like you are using an older AJDT that doesn't support the version of Java you have.  module-info.class will be using byte tag 19 to represent the module object and that should be fine with recent AspectJs.
Comment 3 Joseph Varghese CLA 2019-12-06 09:27:27 EST
I could move forward using the Eclipse Oxygen version with OpenJDK 1.8.0_222.

The 2.10.1 Jackson was recently released for Java 9 projects with in my company, that created the issue. This Java 9 module is apparently not compatible with the AspectJ compiler in Eclipse version.
Comment 4 Andrew Clement CLA 2019-12-06 14:44:47 EST
I think it is worth me clarifying that the version of AJDT on http://download.eclipse.org/tools/ajdt/410/dev/update is for any recent version of Eclipse, not just 4.10 and is the only way to get a version of AJDT that includes a modern AspectJ build. I haven't put 1.9.5 in there yet (the java13 supporting version) but it does include 1.9.4 which supports Java12, and should support the module system from Java9 just fine.