Browse Source

Bug 159854 "Problem Diagnosis Guide"

tags/V1_5_3_final
mwebster 17 years ago
parent
commit
fefcb453eb
4 changed files with 99 additions and 28 deletions
  1. 11
    0
      docs/pdGuideDB/ajcore.xml
  2. 10
    8
      docs/pdGuideDB/ltwdump.xml
  3. 73
    15
      docs/pdGuideDB/messages.xml
  4. 5
    5
      docs/pdGuideDB/pdguide.xml

+ 11
- 0
docs/pdGuideDB/ajcore.xml View File

@@ -55,6 +55,17 @@
e.g. <literal>error</literal>.
</entry>
</row>
<row>
<entry>
<literal>org.aspectj.dump.directory</literal>
</entry>
<entry>
<literal>none</literal>
</entry>
<entry>
The directory used for ajcore files.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>

+ 10
- 8
docs/pdGuideDB/ltwdump.xml View File

@@ -5,16 +5,18 @@
<title>Introduction</title>
<para>
Very rarely, problems present not at build-time but at run-time,
with <literal>java.lang.VerifyError</literal> or incorrect behavior.
In these situations, it's most helpful to include the offending class
in the bug report. But with load-time weaving, the woven classes are
in memory only; to save classes woven at load-time, configure
Very rarely problems may be encountered with classes that have been
load-time woven.
Symptoms will include incorrect program function or a Java exception such as
<literal>java.lang.VerifyError</literal>.
In these situations it's most helpful to include the offending class
in the bug report. When using load-time weaving the woven classes are
in memory only so to save them to disk configure
<literal>META-INF/aop.xml</literal> to dump the classes (by default
to an <literal>_ajdump</literal> subdirectory of the current working
directory). Also, if the input class file is not available (e.g., if
the AspectJ weaver is after another bytecode weaver), you can
also configure the weaver to dump the input classes.
directory). Also if the input class file is not available
(e.g. it is a generated proxy or has already been instrumented by another agent)
you can configure the weaver to dump the input classes as well.
</para>
<sect2 id="ltw-examples" xreflabel="ltwdump-configuration">
<title>Configuring bytecode dumping in load-time weaving</title>

+ 73
- 15
docs/pdGuideDB/messages.xml View File

@@ -6,10 +6,10 @@
<para>
Messages point out potential problems in the input program; some
are clearly problems (errors), but many more may depend on what
the programmer intends. To keep the noise down, the latter are treated
as warnings that can be ignored by the programmer or information
hidden from the programmer. However, when investigating
unexpected behavior, it's helpful to show them. This describes how
the programmer intends. To keep the noise down the latter are treated
as warnings which can be ignored by the programmer or information
which are hidden. However, when investigating
unexpected behavior it's helpful to show them. This section describes how
to configure messages, presents some problem scenarios when
compiling or doing load-time weaving, and summarizes some of the
more relevant messages.
@@ -43,13 +43,16 @@
at build time is to emit both compiler and weaver messages.
</para>
<para> The table below lists some options used to control AspectJ messages. The method
of configuration depends on your environment so refer to the relevant
<para> The tables below list some options, System Properties (for LTW only) and Java 5 annotations
used to control AspectJ messages. The method
of configuration depends on your environment so please refer to the relevant
documentation for
<ulink url="../devguide/ajc-ref.html">ajc</ulink>,
<ulink url="../devguide/.html#antTasks-iajc-options">Ant</ulink> or
<ulink url="../devguide/antTasks.html">Ant</ulink> or
<ulink url="../devguide/ltw-configuration.html#weaver-options">LTW</ulink>.
</para>
<para>
<informaltable>
<tgroup cols="2">
<thead>
@@ -97,34 +100,87 @@
</row>
<row>
<entry>
<literal>messageHolderClass</literal>
<literal>messageHolderClass</literal>/
<literal>-XmessageHolderClass:</literal>
</entry>
<entry>
In Ant tasks, specify the class to receive all messages.
In Ant tasks and LTW respectively specify the class to receive all messages.
See
<ulink url="../devguide/antTasks-iajc.html#antTasks-iajc-options">
iajc task options</ulink>.
iajc task options</ulink> or
<ulink url="../devguide/ltw-configuration.html#weaver-options">
Weaver Options</ulink>.
</entry>
</row>
<!-- We need full javadoc for this API
<row>
<entry>
<literal>rg.aspectj.tools.Main.setMessageHolder(..)</literal>
<literal>org.aspectj.tools.Main.setMessageHolder(..)</literal>
</entry>
<entry>
Programmatic access for setting the message holder
outside of Ant.
</entry>
</row>
-->
</tbody>
</tgroup>
</informaltable>
</para>

<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>System Property</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<literal>aj.weaving.verbose</literal>
</entry>
<entry>
Show informational messages including AspectJ version and build date
(same as <literal>-verbose</literal> option).
</entry>
</row>
<row>
<entry>
<literal>org.aspectj.weaver.showWeaveInfo</literal>
</entry>
<entry>
Show weaving messages
(same as <literal>-showWeaveInfo</literal> option).
</entry>
</row>
<row>
<entry>
<literal>org.aspectj.weaving.messages</literal>
</entry>
<entry>
Set this system property to redirect compiler/weaver
messages to logging facilities, as described in
<xref linkend="trace-configuration"/>.
Set this system property to enable tracing of all compiler
messages. See <xref linkend="trace-configuration"/>.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>Annotation</entry>
<entry>Description</entry>
</row>
</thead>
<tbody>
<row>
<entry>
<literal>@SuppressAjWarnings</literal>
@@ -137,6 +193,8 @@
</tbody>
</tgroup>
</informaltable>
</para>
</sect2>
</sect1>
<sect1 id="messages-scenarios">
@@ -209,7 +267,7 @@
weaveinfo Join point 'method-execution(void HelloWorld.main(java.lang.String[]))' ...
]]></programlisting>
<para>If advice should be woven at this join point, you should get a
<para>If advice is woven at this join point you should get the
corresponding message.</para>
</sect3>
</sect2>

+ 5
- 5
docs/pdGuideDB/pdguide.xml View File

@@ -29,14 +29,14 @@

<abstract>
<para>
This describes how to configure the AspectJ compiler/weaver to provide
information for diagnosing problems in the input programs or in the
compiler/weaver itself.
This guide describes how to configure the AspectJ compiler/weaver to provide
information for diagnosing problems in the input programs, the
compiler/weaver or its configuration.
</para>
<para>
The AspectJ compiler and weaver can provide lots of information for diagnosing
problems in building AspectJ programs. For problems in the input program,
there are a number of default warning and error messages and many
there are a number of default warning and error messages, as well as many
configurable "lint" messages, all of which can be emitted normally,
logged using standard facilities, or intercepted programmatically.
These are discussed in <xref linkend="messages"/>. Since most errors
@@ -44,7 +44,7 @@
<xref linkend="pointcuts"/>.
</para>
<para>
For problems with the compiler/weaver itself, there are three facilities
For problems with the compiler/weaver itself there are three facilities
that enable the AspectJ developers to resolve bugs even when it is
too hard to deliver a reproducible test case:
<orderedlist>

Loading…
Cancel
Save