atom feed4 messages in net.java.dev.spots.devRe: Preverifier - Illegal type in con...
FromSent OnAttachments
PieterFeb 17, 2010 9:06 am 
Eric ArseneauFeb 17, 2010 10:39 am 
PieterFeb 18, 2010 3:17 am 
Eric ArseneauMar 16, 2010 8:26 pm 
Subject:Re: Preverifier - Illegal type in constant pool (AOP)
From:Pieter (piet@skynet.be)
Date:Feb 18, 2010 3:17:07 am
List:net.java.dev.spots.dev

In the file compile.xml I changed <javac sourcepath="" srcdir="${src.dir}" destdir="${build.dir}" includeAntRuntime="no" includeJavaRuntime="no" bootclasspath="${sunspot.bootclasspath}"

classpath="${sunspot.classpath}${path.separator}${utility.jars.on.classpath}" target="1.2" source="1.3" debug="true" fork="yes" includes="${spot.javac.include.src}" excludes="${spot.javac.exclude.src}"/>

into: <taskdef

resource="org/aspectj/tools/ant/taskdefs/aspectjTaskdefs.properties"> <classpath> <pathelement location="/usr/share/java/aspectjtools.jar"/> </classpath> </taskdef>

<iajc sourceRoots="${src.dir}" destdir="${build.dir}" inpath="/usr/share/java/aspectjrt.jar" bootclasspath="${sunspot.bootclasspath}"

classpath="${sunspot.classpath}${path.separator}${utility.jars.on.classpath}:/usr/share/java/aspectjrt.jar:/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/rt.jar" target="1.3" source="1.3" debug="true" fork="yes" includes="${spot.javac.include.src}, org/aspectj/**/*.java" excludes="${spot.javac.exclude.src}"/>

Changing the version doesn't seem to change anything. In the file preverify.xml I changed <target name="-do-preverify" depends="-make-preverify-directory, -unjar-utility-jars"> <exec executable="${preverify.executable}" failonerror="true"> <arg value="-d"/> <arg value="${preverify.dir}"/> <arg value="-classpath"/> <arg value="${sunspot.bootclasspath}${path.separator}${sunspot.classpath}${path.separator}${preverify.dir}"/> <arg value="${build.dir}"/> </exec> </target>

into <target name="-do-preverify" depends="-make-preverify-directory, -unjar-utility-jars"> <exec executable="${preverify.executable}" failonerror="true"> <arg value="-d"/> <arg value="${preverify.dir}"/> <arg value="-classpath"/> <arg value="${sunspot.bootclasspath}${path.separator}${sunspot.classpath}${path.separator}${preverify.dir}:/usr/share/java/aspectjrt.jar:/usr/lib/jvm/java-6-sun-1.6.0.13/jre/lib/rt.jar"/> <arg value="${build.dir}"/> </exec> </target>

This is what I found on http://eclipse.org/aspectj/doc/released/devguide/antTasks-iajc.html:

target

Specify target class file format as one of [1.1 1.2]. Defaults to 1.1 class file.

source

Set source compliance level to one of [1.3 1.4 1.5] (default is 1.4). 1.3 implies -source 1.3 and -target 1.1. 1.4 implies -source 1.4 and -target 1.2. 1.5 implies -source 1.5 and -target 1.5.

What could be wrong?

Op woensdag 17-02-2010 om 10:39 uur [tijdzone -0800], schreef Eric Arseneau:

See if there is any way to force AspectJ to compile to 1.3 class files. To
compile using more modern versions of javac, you need to specify

-source 1.3 -target 1.3

As command line options to the compiler.

On Feb 17, 2010, at 9:07 AM, Pieter wrote:

Hi,

I'm trying to use AOP on the SunSPOT. I already succeeded in compiling the code with the AspectJ compiler, but I get this error in the preverify step of the deployement process: -do-preverify: [exec] Error preverifying class org.aspectj.lang.Aspects [exec] VERIFIER ERROR org/aspectj/lang/Aspects.<clinit>()V: [exec] Illegal type in constant pool

This is the aspect code I wrote: public aspect aspct {

pointcut trace() : execution(* *.*(..)) && !within(aspct);

before() : trace() { System.out.println("Entering function"); }

after() returning() : trace() { System.out.println("Exiting function"); } }

Could somebody please explain what causes this type of error to show up? Thanks!

Kind regards,