Message scenarios

Compile-time weaving scenarios

Advice not woven

This means that the pointcut for the advice did not match, and it should be debugged as described in Debugging Pointcuts.

Load-time weaving scenarios

You can use META-INF/aop.xml to control which messages are produced during LTW. The following example will produce basic informational messages about the lifecyle of the weaver in addition to any warning or error messages.

		<weaver options="-verbose">

The messages indicate which META-INF/aop.xml configurations file(s) are being used. Each message is also preceeded by the name of the defining class loader associated with weaver. You can use this information in a large system to distinguish between different applications each of which will typically have its own class loader.

[AppClassLoader@92e78c] info AspectJ Weaver Version 1.5.3 built on Thursday Oct 26, 2006 at 17:22:31 GMT
[AppClassLoader@92e78c] info register classloader sun.misc.Launcher$AppClassLoader@92e78c
[AppClassLoader@92e78c] info using configuration /C:/temp/META-INF/aop.xml
[AppClassLoader@92e78c] info using configuration /C:/temp/META-INF/aop-ajc.xml
[AppClassLoader@92e78c] info register aspect ExceptionHandler
[AppClassLoader@92e78c] info processing reweavable type ExceptionHandler: ExceptionHandler.aj

Advice not woven

It is often difficult to determine, especially when using load-time weaving (LTW), why advice has not been woven. Here is a quick guide to the messages to look for. Firstly if you use the -verbose option you should see the following message when your aspect is registered:

	info register aspect MyAspect

Secondly if you use the -debug option you should see a message indicating that you class is being woven:

	debug weaving 'HelloWorld'

However this does not mean that advice has actually been woven into your class; it says that the class has been passed to the weaver. To determine whether your pointcuts match you can use the -showWeaveInfo option which will cause a message to be issued each time a join point is woven:

	weaveinfo Join point 'method-execution(void HelloWorld.main(java.lang.String[]))' ...

If advice is woven at this join point you should get the corresponding message.