LTW Dump
Introduction
Occasionally problems may be encountered with classes that have been load-time woven.
Symptoms will include incorrect program function or a Java exception such as
java.lang.VerifyError. Problems can be caused by the way
an aspect or class is built, incompatibilities between AspectJ and
generated byte-code
e.g. CGLIB
or a bug in the weaver.
When these problems occur it may be necessary to attach the class files concerned
to a bug report. AspectJ can be configured to dump byte-code to disk using
META-INF/aop.xml. The _ajdump subdirectory the the current
working directory is used.
Configuration
See the
Development Environment Guide
for details of how to configure byte-code dumping.
Examples
By default AspectJ will dump byte-code only after it is woven. This
is because usually the original class file is already available. However
byte-code is sometimes generated by frameworks or downloaded over the network
in which case AsepctJ can dump the byte-code before it is woven too.
The following META-INF/aop.xml will
weave classes in the com.foo package (and subpackages) but not
CGLIB generated classes in the com.foo.bar package (and subpackages).
It will also ensure all
woven byte-code is dumped both before and after weaving.
]]>
You should see messages similar to this:
On disk you would find the following files: