Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] after converting and existing project to an AspectJ project Ant doesn't run

Try running ant outside eclipse, or forking iajc.

https://bugs.eclipse.org/bugs/show_bug.cgi?id=49286
https://bugs.eclipse.org/bugs/show_bug.cgi?id=34246

Wes

Mike Oliver wrote:

I created a new AspectJ project with no aspects at all, just the following class

public class Test {

   public Test() {
       super();
   }

   public static void testMethod(String s){
       System.out.println(s);
   }
   public static void main(String[] args) {
       Test test = new Test();
       test.testMethod("TestBuild");
   }
}

Which I was going to write a simple aspect to test with.

But I wanted a baseline so I created the following build.xml

<project name="TestBuild" default="compile_aspect" basedir=".">
   <description>
       AspectJ Build file tests
   </description>
   <!-- set global properties for this build -->
   <property name="src" location="src"/>
   <property name="build" location="build"/>
<property name="aspectjtools" location="/root/java/eclipse/plugins/org.aspectj.ajde_1.1.4/aspectjtools.jar"/> <property name="aspectjrt" location="/root/java/eclipse/plugins/org.aspectj.ajde_1.1.4/aspectjrt.jar"/> <taskdef resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties">
       <classpath>
           <pathelement path="${aspectjtools}" />
       </classpath>
   </taskdef>
   <target name="compile_aspect" depends="init"
               description="Compiles the source code with aspects">
       <iajc destDir="${build}" srcdir="${src}">
           <classpath>
               <pathelement path="${aspectjrt}"/>
           </classpath>
       </iajc>
   </target>
<target name="init"> <!-- Create the build directory structure used by compile -->
       <mkdir dir="${build}"/>
   </target>   </project>

and I get the same exact exception I was getting with the more complex project

compile_aspect:
       [iajc] ABORT
       [iajc] Exception thrown from AspectJ 1.1.1
       [iajc]
       [iajc] This might be logged as a bug already -- find current bugs at
[iajc] http://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler
       [iajc]
[iajc] Bugs for exceptions thrown have titles File:line from the top stack,
       [iajc] e.g., "SomeFile.java:243"
       [iajc]
[iajc] If you don't find the exception below in a bug, please add a new bug
       [iajc] at http://bugs.eclipse.org/bugs/enter_bug.cgi?product=AspectJ
       [iajc] To make the bug a priority, please include a test program
       [iajc] that can reproduce this exception.
[iajc] (class: org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment, method: createBinaryTypeFrom signature: (Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;Lorg/eclipse/jdt/internal/compiler/lookup/PackageBinding;Z)Lorg/eclipse/jdt/internal/compile [iajc] (class: org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment, method: createBinaryTypeFrom signature: (Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;Lorg/eclipse/jdt/internal/compiler/lookup/PackageBinding;Z)Lorg/eclipse/jdt/internal/compile [iajc] java.lang.VerifyError: (class: org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment, method: createBinaryTypeFrom signature: (Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;Lorg/eclipse/jdt/internal/compiler/lookup/PackageBinding;Z)Lorg/eclipse/jdt/internal/compile [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.performCompilation(AjBuildManager.java:352) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:125) [iajc] at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:70) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:99) [iajc] at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:53)
       [iajc]     at org.aspectj.tools.ajc.Main.run(Main.java:217)
       [iajc]     at org.aspectj.tools.ajc.Main.runMain(Main.java:155)
[iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.executeInSameVM(AjcTask.java:1047) [iajc] at org.aspectj.tools.ant.taskdefs.AjcTask.execute(AjcTask.java:904)
       [iajc]     at org.apache.tools.ant.Task.perform(Task.java:341)
       [iajc]     at org.apache.tools.ant.Target.execute(Target.java:309)
[iajc] at org.apache.tools.ant.Target.performTasks(Target.java:336) [iajc] at org.apache.tools.ant.Project.executeTarget(Project.java:1339) [iajc] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:571) [iajc] at org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:367) [iajc] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [iajc] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) [iajc] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       [iajc]     at java.lang.reflect.Method.invoke(Method.java:324)
       [iajc]     at org.eclipse.ant.core.AntRunner.run(AntRunner.java:335)
[iajc] at org.eclipse.ui.externaltools.internal.ant.launchConfigurations.AntLaunchDelegate$1.run(AntLaunchDelegate.java:172)
       [iajc]     at java.lang.Thread.run(Thread.java:534)
       [iajc]
[iajc] BUILD FAILED: file:/root/java/eclipse/workspace/TestBuild/build.xml:19: fail due to VerifyError "(class: org/aspectj/ajdt/internal/compiler/lookup/AjLookupEnvironment, method: createBinaryTypeFrom signature: (Lorg/eclipse/jdt/internal/compiler/env/IBinaryType;Lorg/eclipse/jdt/internal/compiler/lookup/PackageBinding;Z)Lorg/eclipse/jdt/internal/compile""ABORT" (1 exceptions)
Total time: 1 second

I am on Linux Red Hat 9, Eclipse 2.1.1

The Test classes and the JUnit Tests and the Aspects on the more complex project are all working, just not the build/Ant.

I have tried setting the Ant preferences to use different copies of the aspectjrt.jar and aspectjtools.jar but no effect.

Stumped in Tucson,

Ollie


_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users




Back to the top