[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-dev] trouble with load-time weaving
|
I'm having major trouble geting load-time weaving to work in Eclipse.
I lifted a simple example from
http://www.aspectprogrammer.org/blogs/adrian/2004/05/loadtime_weavin.html
Boy/Girl/Kissable/Main with aspect Teacher.
If I run with load time weaving, I get a bunch of errors, a subset of which I included at the end of this message.
The most puzzling thing is that it tells me that classes were already
woven and were not built in reweavable mode, but if I put -Xreweavable
into the <project> -> Properties -> AspectJ -> Non
standard compiler options field, I get a message that -Xreweavable is
turned on by default.
Any ideas on what I could be do to make the errors go away?
I am using Java 5 (compiler compliance level set to 5 in the workspace configuration).
I have
-javaagent:<my path to>/aspectjweaver.jar
set in the <run> -> Arguments -> VM arguments field.
I am running on Linux, kernel
2.6.11-kanotix-7
I am running Eclipse 3.1.2.
I have AspectJ 1.5. aspectjrt.jar is on my CLASSPATH.
A small subset of the error messages:
java.lang.ClassCircularityError: org/aspectj/weaver/UnresolvedType
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:620
...
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
error at Boy.java::0 class 'Boy' is already woven and has not been built in reweavable mode
abort trouble in:
public class Boy extends java.lang.Object implements Kissable:
public void <init>():
ALOAD_0 // Boy this (line 4)
INVOKESPECIAL java.lang.Object.<init> ()V
RETURN
end public void <init>()
public void kiss() org.aspectj.weaver.MethodDeclarationLineNumber: 5:58
:
GETSTATIC java.lang.System.out Ljava/io/PrintStream; (line
6)
LDC "wahay!"
INVOKEVIRTUAL java.io.PrintStream.println (Ljava/lang/String;)V
GOTO L0 (line 7)
L0: INVOKESTATIC Teacher.aspectOf ()LTeacher;
INVOKEVIRTUAL Teacher.ajc$afterReturning$Teacher$1$ac0a1a5a ()V
RETURN
end public void kiss()
end public class Boy
(end error message output)
--
Ducky Sherwood