]> source.dussan.org Git - aspectj.git/commitdiff
Bug 159854 "Problem Diagnosis Guide"
authormwebster <mwebster>
Thu, 9 Nov 2006 13:31:42 +0000 (13:31 +0000)
committermwebster <mwebster>
Thu, 9 Nov 2006 13:31:42 +0000 (13:31 +0000)
docs/pdGuideDB/ajcore.xml
docs/pdGuideDB/ltwdump.xml
docs/pdGuideDB/messages.xml
docs/pdGuideDB/pdguide.xml

index 838c6d7b42434fbac1128b35bfd5b1377a12e3a5..3ca82849f559e2e58b12a3e007f653b62ca93c38 100644 (file)
                                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>
index 049f2e4f5c79d3c82056fff5d9fb7faf68326e89..a17ceae5b24b8c940001805e24e6534864f5f145 100644 (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>
index cadb2a0df9dc025db067593a005168ada8f1fad3..8d2a2ab97c88505d0140c9c2bd1693ea6d590029 100644 (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.
                 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>
                         </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>
                     </tbody>
                 </tgroup>
             </informaltable>
+            </para>
+            
         </sect2>        
     </sect1>        
     <sect1 id="messages-scenarios">
        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>
index 5581d539551dc83104fcabe039d112e3d9a42eac..08af6fe28e83ddbcc67a54df6778d178d3f38563 100644 (file)
 
     <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>