Skip to main content

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

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



Back to the top