Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » AJDT » Load Time Weaving
Load Time Weaving [message #890572] Fri, 22 June 2012 15:34
Holger Peterson is currently offline Holger Peterson
Messages: 1
Registered: June 2012
Junior Member
Hello Guys,
I'm currently trying to apply load time weaving to my project.
I created a simple AspectJ project in Eclipse and I'm able to weave it during compile time successful.
I created two packages. One is called "examples.AspectJ" where you can find my java class. The second package is called "examples.AspectJ.aspect" where you can find my aspect.
Additionally, I added the aop.xml file in the Project/AspectJ-Properties and I inserted "-Daj.weaving.verbose=true -Dorg.aspectj.weaver.showWeaveInfo=true -javaagent:c:/aspectj1.6/lib/aspectjweaver.jar -Xbootclasspath/a:C:/aspectj1.6/lib/aspectjrt.jar;C:/Users/hpet/Documents/aspect.jar" to the VM arguments of my run configuration.

When I'm trying to run altogether, I got the following error message:

[AppClassLoader@1473a2e] info AspectJ Weaver Version 1.6.12 built on Tuesday Oct 18, 2011 at 17:52:06 GMT
[AppClassLoader@1473a2e] info register classloader sun.misc.Launcher$AppClassLoader@1473a2e
[AppClassLoader@1473a2e] info using configuration file:/C:/Users/hpet/Documents/aspect.jar!/META-INF/aop.xml
[AppClassLoader@1473a2e] info register aspect examples.AspectJ.aspect.AspectClass
[AppClassLoader@1473a2e] debug weaving 'examples.AspectJ.JavaClass'
[AppClassLoader@1473a2e] info processing reweavable type examples.AspectJ.JavaClass: examples\AspectJ\JavaClass.java
[AppClassLoader@1473a2e] info successfully verified type examples.AspectJ.aspect.AspectClass exists.  Originates from examples\AspectJ\aspect\C:\workspace\AspectJExample\src\examples\AspectJ\aspect\AspectClass.aj
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:13) advised by after advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:38)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:13) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:60)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:13) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:55)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:13) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:42)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(double))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:14) advised by after advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:38)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(double))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:14) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:60)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(double))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:14) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:55)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(double))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:14) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:42)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int, java.lang.String))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:15) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:60)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int, java.lang.String))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:15) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:55)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int, double))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:16) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:60)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method1(int, double))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:16) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:55)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(void examples.AspectJ.JavaClass.method2(int, java.lang.String))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:17) advised by before advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:64)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(int examples.AspectJ.JavaClass.test(int))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:24) advised by afterReturning advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:51)
[AppClassLoader@1473a2e] weaveinfo Join point 'method-call(int examples.AspectJ.JavaClass.test(int))' in Type 'examples.AspectJ.JavaClass' (JavaClass.java:24) advised by around advice from 'examples.AspectJ.aspect.AspectClass' (AspectClass.aj:68)
[AppClassLoader@1473a2e] debug generating class 'examples.AspectJ.JavaClass$AjcClosure1'
Aspect Execution Code BEFORE...
Exception in thread "main" java.lang.NoClassDefFoundError: examples/AspectJ/JavaClass
	at examples.AspectJ.aspect.AspectClass.ajc$before$examples_AspectJ_aspect_AspectClass$2$3b6e9b9c(AspectClass.aj:44)
	at examples.AspectJ.JavaClass.main(JavaClass.java:13)


I'm guessing that there's some dependency between the aspect and the java class and the aspect is not able to find the java class.

Thanks for your help.

Previous Topic:BIRT input format
Next Topic:About VFP
Goto Forum:
  


Current Time: Wed Sep 17 21:59:23 GMT 2014

Powered by FUDForum. Page generated in 0.03805 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software