Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re :[aspectj-users] Load-time weaving problem

Hi Stefen,

Are you using the aj command to see the output? Have you created the aop.xml that is essential for weaving the aspects at load-time?

If you can describe the steps that you followed, it would be great for us to analyze the problem.

~Kunal.


On Mon, 25 Feb 2008 18:42:19 +0100 aspectj-users@xxxxxxxxxxx wrote
Hi there,

I can't get load-time weaving to work. Compile-time weaving however
works fine so I suppose the @ApsectJ annotations are all okay.

I'm using AspectJ 1.5.4 and tried on Java 5 and 6 on Mac OS X 10.5.2
if that matters. I pass the following VM option to the java executable:

-javaagent:lib/aspectjweaver.jar

The jar file is found by the JVM (changing the path/name causes an
error) but the aspects are not woven in.

Any ideas? Did I miss something fundamental in the documentation?

I also added the following options:

-Daj.weaving.verbose=true
-Dorg.aspectj.weaver.showWeaveInfo=true
-Dorg.aspectj.tracing.enabled=true
-Dorg.aspectj.tracing.factory=default
-Dorg.aspectj.tracing.file=aspectj-trace.log

and found some suspicious output in the log:

18:37:43.185 main > org.aspectj.weaver.loadtime.Aj.preProcess
org.aspectj.weaver.loadtime.Aj@375212bc audaarch/Service, byte[361],
sun.misc.Launcher$AppClassLoader@517590db
18:37:43.186 main - org.aspectj.weaver.loadtime.Aj.preProcess
org.aspectj.weaver.loadtime.Aj@375212bc sun.misc.Launcher
$ExtClassLoader@e47858e, sun.misc.Launcher$AppClassLoader@517590db
18:37:43.186 main > org.aspectj.weaver.tools.WeavingAdaptor.weaveClass
org.aspectj.weaver.loadtime.ClassLoaderWeavingAdaptor@2e5bbd6 audaarch/
Service, byte[361]
18:37:43.186 main < org.aspectj.weaver.tools.WeavingAdaptor.weaveClass
false
18:37:43.186 main > org.aspectj.weaver.Dump.dumpOnExit
org.aspectj.weaver.tools.WeavingAdaptor
$WeavingAdaptorMessageHolder@42f1916f
18:37:43.186 main > org.aspectj.weaver.Dump.shouldDumpOnExit
org.aspectj.weaver.tools.WeavingAdaptor
$WeavingAdaptorMessageHolder@42f1916f
18:37:43.186 main - org.aspectj.weaver.Dump.shouldDumpOnExit abort
18:37:43.186 main < org.aspectj.weaver.Dump.shouldDumpOnExit false
18:37:43.186 main < org.aspectj.weaver.Dump.dumpOnExit Excluded

audaarch.Service is the Interface of the aspect's target.

Thanks in advance,
Stefan

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


Back to the top