AspectJ-for-NetBeans (UMUC SWEN 670) - plugin detailAspectJ-for-NetBeans: Plugin for working with AspectJ in NetBeans. This project is the result of the SWEN 670 Capstone Project course at University of Maryland University College: Stan Derevyanko, Carlos Maldonado, Melvin Paige, and Alex Wancowicz. The plugin results from work done on the open source distribution of the ramos AspectJ-for-NetBeans code available on GitHub. Functionality and support for annotations has been removed. The team focused on basic requirements for building and running AspectJ programs. This version has been verified to be stable in NetBeans 8.0.1. Installation: Download the (.nbm) file into a folder. Open NetBeans and under Tools go to Plugins. Click the Download tab in the Plugins window. Click to Add Plugins... and follow the prompts to open and select the (.nbm) file. Click to install the plugins, and this will prompt you to close and reopen NetBeans. Instructions: Set a project in the NetBeans IDE as Default with Run:Set Main Project and toggle the plugin on with the Tools:AspectJ Start AJDE menu item, or with the toolbar button. Include AspectJ code in a (.aj) file. In the project you can create a new file from the AspectJ category in the project's New File dialog. To build the project first create an empty (.lst) file and type the name of each file for the build on a separate line. Save the file, and select it using the Tools:AspectJ Select Build Configuration menu item. AspectJ code will be converted to (.class) files automatically when the project is built. AspectJ compiler errors display in a tab separate from the project output tab.
[ You have to be logged in to be able to comment. ] User CommentsHad to use older versions
So this plugin did not work with Netbeans 8.2 and JDK 8, I had to install "jdk-7u80-nb-8_0_2-windows-x64.exe" and go back through all of the steps to finally get it to work. Also, when first creating the aspect (*.aj) file, NB would lock up and I'd have to restart NB in order to get things going again.
Posted by cddrury on Sep 14, 2017
Message: ClassFormatException thrown: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 15
Hello,
with the new plug-in I have the same problem that RobWilkinsonUS reported.
Posted by celada on May 27, 2017
May not work with Java 8
I believe that this only works with Java 7. There seems to be a common issue with Java 8. We are working to update it.
Posted by mbrown36 on Apr 06, 2016
Message: ClassFormatException thrown: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 18
I have followed the video: https://www.youtube.com/watch?v=DgF_5bRH9-Q#t=320
But as I try, I still dating the same mistake. I use NetBeans 8.0.2 and JDK 8. PD: The project is made with Maven. The full stacktrace is: Message: ClassFormatException thrown: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 18 Stack trace: org.aspectj.apache.bcel.classfile.ClassFormatException: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 18 at org.aspectj.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:261) at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:162) at org.aspectj.weaver.bcel.BcelWorld.lookupJavaClass(BcelWorld.java:384) at org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:338) at org.aspectj.weaver.World.resolveToReferenceType(World.java:378) at org.aspectj.weaver.World.resolve(World.java:271) at org.aspectj.weaver.World.resolve(World.java:191) at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:107) at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:46) at org.aspectj.weaver.bcel.BcelObjectType.ensureGenericSignatureUnpacked(BcelObjectType.java:707) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredInterfaces(BcelObjectType.java:201) at org.aspectj.weaver.ReferenceType.getDeclaredInterfaces(ReferenceType.java:430) at org.aspectj.weaver.ResolvedType.getDirectSupertypes(ResolvedType.java:65) at org.aspectj.weaver.ResolvedType.collectInterTypeMungers(ResolvedType.java:1156) at org.aspectj.weaver.ResolvedType.getInterTypeMungersIncludingSupers(ResolvedType.java:1135) at org.aspectj.weaver.ResolvedType.checkInterTypeMungers(ResolvedType.java:1202) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:643) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:519) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1060) 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:111) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:87) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java:757) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.methods(BinaryTypeBinding.java:740) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation.resolveType(Annotation.java:227) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.ASTNode.resolveAnnotations(ASTNode.java:436) at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.getAnnotationTypes(EclipseSourceType.java:692) at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.isAnnotationStyleAspect(EclipseSourceType.java:149) at org.aspectj.ajdt.internal.compiler.lookup.EclipseSourceType.isAspect(EclipseSourceType.java:128) at org.aspectj.weaver.ReferenceType.isAspect(ReferenceType.java:159) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.verifyAnyTypeParametersMeetBounds(AjLookupEnvironment.java:269) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.completeTypeBindings(AjLookupEnvironment.java:228) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.beginToCompile(Compiler.java:301) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:315) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:906) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:260) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:212) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:183) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:102) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)
Posted by ferchop1089 on Oct 23, 2015
Message: ClassFormatException thrown: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 15
Hello,
with the new plug-in I have the same problem that RobWilkinsonUS reported. I am using Netbeans 8.0.2 on Java SE Runtime Environment 1.8.0_20-b26 Thanks, Michelangelo
Posted by mriccobene on Jul 16, 2015
Plugin update
The new plugin module (.nbm) works in NetBeaans 8.0.1 and 8.0.2 on Java JDK v7 and v8.
The project uses aspectj 1-5-3 to get the only known repository of the AJDE. That said, 1-5-3 is not a requirement to use the plugin. It is safe to say that you should use any version greater than or equal to 1-5-3 with your projects. We recommend using the latest jars accessible on the eclipse.org website. Thanks, Carlos Maldonado
Posted by cm223344 on Jul 01, 2015
Response to JDK 8 issue
Hello RobWilkinsonUS,
I am sorry that you are had issues installing it. I am not sure if it runs in JDK 8. All of our tests were on JDK 7. From your last post, I assume that you got it running. We might update it in the future to run under JDK 8. Thanks Dr. Brown UMUC
Posted by mbrown36 on Jun 27, 2015
Running this under Netbeans 8.02 Will not work with JDK 8 but will with JDK 7
You need to actually run netbeans itself using JDK 7. This lugin will not work with Netbeans run under JDK 8.
Regards, Rob
Posted by RobWilkinsonUS on Jun 17, 2015
Is this an active plugin??
If this is an active plugin I would have thought a dead in the water problem might at least warrant a response. If it is not is there anything else that integrates AspectJ with Netbeans.
Having been a Netbeans user since the beginning I am disappointed not to immediately get this working or receive a response to these comments or an email, and yet Eclipse works out of the box with it. It looks like there is a mismatch between the Apache bcel library included with it and the JDK. Regards, Rob
Posted by RobWilkinsonUS on Jun 17, 2015
Message: ClassFormatException thrown: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 15
I have followed the video, although it doesn't quite match this version. No matter what I do I get the ClassFormatException below:
I am using Netbeans 8.0.2 and 1419684377_ramos-aspectjfornetbeansmodule.nbm I have added the runtime library from aspectj-1.8.6.jar I have tried with both jdk 7 and 8 The full stacktrace is: Message: ClassFormatException thrown: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 15 Stack trace: org.aspectj.apache.bcel.classfile.ClassFormatException: File: 'java/lang/CharSequence.class': Invalid byte tag in constant pool: 15 at org.aspectj.apache.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:261) at org.aspectj.apache.bcel.classfile.ClassParser.parse(ClassParser.java:162) at org.aspectj.weaver.bcel.BcelWorld.lookupJavaClass(BcelWorld.java:384) at org.aspectj.weaver.bcel.BcelWorld.resolveDelegate(BcelWorld.java:338) at org.aspectj.weaver.World.resolveToReferenceType(World.java:378) at org.aspectj.weaver.World.resolve(World.java:271) at org.aspectj.weaver.World.resolve(World.java:191) at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:107) at org.aspectj.weaver.bcel.BcelGenericSignatureToTypeXConverter.classTypeSignature2TypeX(BcelGenericSignatureToTypeXConverter.java:46) at org.aspectj.weaver.bcel.BcelObjectType.ensureGenericSignatureUnpacked(BcelObjectType.java:707) at org.aspectj.weaver.bcel.BcelObjectType.getDeclaredInterfaces(BcelObjectType.java:201) at org.aspectj.weaver.ReferenceType.getDeclaredInterfaces(ReferenceType.java:430) at org.aspectj.weaver.ResolvedType.getDirectSupertypes(ResolvedType.java:65) at org.aspectj.weaver.ResolvedType.collectInterTypeMungers(ResolvedType.java:1156) at org.aspectj.weaver.ResolvedType.getInterTypeMungersIncludingSupers(ResolvedType.java:1135) at org.aspectj.weaver.ResolvedType.checkInterTypeMungers(ResolvedType.java:1202) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:643) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.weaveInterTypeDeclarations(AjLookupEnvironment.java:519) at org.aspectj.ajdt.internal.compiler.lookup.AjLookupEnvironment.createBinaryTypeFrom(AjLookupEnvironment.java:1060) 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:111) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.UnresolvedReferenceBinding.resolve(UnresolvedReferenceBinding.java:43) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveType(BinaryTypeBinding.java:87) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.resolveTypesFor(BinaryTypeBinding.java:757) at org.aspectj.org.eclipse.jdt.internal.compiler.lookup.BinaryTypeBinding.methods(BinaryTypeBinding.java:740) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.Annotation.resolveType(Annotation.java:227) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.Expression.resolve(Expression.java:829) at org.aspectj.ajdt.internal.compiler.ast.AtAspectJAnnotationFactory.addAnnotation(AtAspectJAnnotationFactory.java:292) at org.aspectj.ajdt.internal.compiler.ast.AdviceDeclaration.addAtAspectJAnnotations(AdviceDeclaration.java:302) at org.aspectj.ajdt.internal.compiler.ast.AddAtAspectJAnnotationsVisitor.visit(AddAtAspectJAnnotationsVisitor.java:65) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.MethodDeclaration.traverse(MethodDeclaration.java:185) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.traverse(TypeDeclaration.java:1195) at org.aspectj.org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.traverse(CompilationUnitDeclaration.java:339) at org.aspectj.ajdt.internal.compiler.AjPipeliningCompilerAdapter.beforeProcessing(AjPipeliningCompilerAdapter.java:286) at org.aspectj.ajdt.internal.compiler.CompilerAdapter.ajc$before$org_aspectj_ajdt_internal_compiler_CompilerAdapter$3$6b855184(CompilerAdapter.aj:89) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java) at org.aspectj.org.eclipse.jdt.internal.compiler.Compiler.compile(Compiler.java:329) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:906) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:260) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:212) at org.aspectj.ajdt.internal.core.builder.AjBuildManager.incrementalBuild(AjBuildManager.java:183) at org.aspectj.ajde.internal.CompilerAdapter.compile(CompilerAdapter.java:102) at org.aspectj.ajde.internal.AspectJBuildManager$CompilerThread.run(AspectJBuildManager.java:191)
Posted by RobWilkinsonUS on Jun 16, 2015
Installation Video
Here is an installation video on the plugin.
https://www.youtube.com/watch?v=DgF_5bRH9-Q&feature=youtu.be
Posted by mbrown36 on May 05, 2015
|