aboutsummaryrefslogtreecommitdiffstats
path: root/docs/pdGuideDB/ajcore.xml
blob: 7207df3cc26573f0beecead618af4052b5c87a55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<chapter id="ajcore" xreflabel="AspectJ Core Files">
    <title>AspectJ Core Files</title>

    <sect1 id="ajcore-introduction">
        <title>Introduction</title>

        <para> When the compiler terminates abnormally, either because a particular kind of message was
        issued or an exception was thrown, an AspectJ core file will be produced. You will
        find it the working directory of the compiler and it will have a name that contains
        the date and time that the file was produced
        e.g. <literal>ajcore.20060810.173655.626.txt</literal>. The file contains details
        of the problem such as the exception thrown as well as information about the
        environment such as operating system and Java version. When submitting a bug,
        include this file whenever it is available.</para>

        <sect2 id="configuration" xreflabel="configuration">
            <title>Configuring dump files</title>

            <para> By default AspectJ will only create an <literal>ajcore</literal> file
            when an unexpected exception is thrown by the weaver or an
            <literal>abort</literal> message is
            issued. However it is possible to disable this feature or enable files to
            be produced under different circumstances. The table below lists the System
            properties that can be used to configure <literal>ajcore</literal> files. </para>
            <informaltable>
                <tgroup cols="3">
                    <thead>
                        <row>
                            <entry>Property</entry>
                            <entry>Default</entry>
                            <entry>Description</entry>
                        </row>
                    </thead>
                    <tbody>
                        <row>
                            <entry>
                                <literal>org.aspectj.weaver.Dump.exception</literal>
                            </entry>
                            <entry>
                                <literal>true</literal>
                            </entry>
                            <entry>
                            	Generate an <literal>ajcore</literal> files when an exception thrown.
                            </entry>
                        </row>
                        <row>
                            <entry>
                                <literal>org.aspectj.weaver.Dump.condition</literal>
                            </entry>
                            <entry>
                                <literal>abort</literal>
                            </entry>
                            <entry>
                            	Message kind for which to generate <literal>ajcore</literal>
                            	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>
  		</sect2>

        <sect2 id="ajcore-examples" xreflabel="AJCore File Examples">
            <title>AJCore File Examples</title>

            <para> Below is an extract from an <literal>ajcore</literal> file. You will see
            details of the dump configuration as well as the exception (with stack trace) that
            is the source of the problem and any messages issued by the compiler. Most importantly
            the exact version of AspectJ is included. </para>
	        <programlisting><![CDATA[
---- AspectJ Properties ---
AspectJ Compiler DEVELOPMENT built on Tuesday Jul 25, 2006 at 13:00:09 GMT
---- Dump Properties ---
Dump file: ajcore.20060810.173655.626.txt
Dump reason: java.lang.NoClassDefFoundError
Dump on exception: true
Dump at exit condition: abort
---- Exception Information ---
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
	at org.aspectj.weaver.tools.CommonsTraceFactory.<init>(CommonsTraceFactory.java:17)
	at java.lang.Class.newInstance0(Native Method)
	at java.lang.Class.newInstance(Class.java:232)
	at org.aspectj.weaver.tools.TraceFactory.<clinit>(TraceFactory.java:35)
	at org.aspectj.weaver.World.<clinit>(World.java:114)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:679)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:224)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:164)
	at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
	at org.aspectj.tools.ajc.Main.run(Main.java:367)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:246)
	at org.aspectj.tools.ajc.Main.main(Main.java:86)
---- System Properties ---
java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
sun.boot.library.path=C:\jdk1.3.1_16\jre\bin
java.vm.version=1.3.1_16-b06
java.vm.vendor=Sun Microsystems Inc.
java.vendor.url=http://java.sun.com/
path.separator=;
java.vm.name=Java HotSpot(TM) Client VM
file.encoding.pkg=sun.io
java.vm.specification.name=Java Virtual Machine Specification
user.dir=C:\workspaces\org.aspectj\org.aspectj.ant.tests
java.runtime.version=1.3.1_16-b06
java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
os.arch=x86
java.io.tmpdir=C:\DOCUME~1\IBM_user\LOCALS~1\Temp\
line.separator=

java.vm.specification.vendor=Sun Microsystems Inc.
java.awt.fonts=
os.name=Windows XP
java.library.path=C:\jdk1.3.1_16\jre\bin;...
java.specification.name=Java Platform API Specification
java.class.version=47.0
os.version=5.1
user.home=C:\Documents and Settings\IBM_user
user.timezone=Europe/London
java.awt.printerjob=sun.awt.windows.WPrinterJob
file.encoding=Cp1252
java.specification.version=1.3
java.class.path=C:\workspaces\org.aspectj\aj-build\dist\tools\lib\aspectjtools.jar
user.name=IBM_user
java.vm.specification.version=1.0
java.home=C:\jdk1.3.1_16\jre
user.language=en
java.specification.vendor=Sun Microsystems Inc.
awt.toolkit=sun.awt.windows.WToolkit
java.vm.info=mixed mode
java.version=1.3.1_16
java.ext.dirs=C:\jdk1.3.1_16\jre\lib\ext
sun.boot.class.path=C:\jdk1.3.1_16\jre\lib\rt.jar;...
java.vendor=Sun Microsystems Inc.
file.separator=\
java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
sun.io.unicode.encoding=UnicodeLittle
sun.cpu.endian=little
user.region=GB
sun.cpu.isalist=pentium i486 i386
---- Command Line ---
-d
C:\workspaces\org.aspectj\org.aspectj.ant.tests\IncrementalAjcTaskTest-temp
-g:none
-deprecation
-noExit
-warn:-unusedImport
-nowarn
-XterminateAfterCompilation
-preserveAllLocals
-proceedOnError
-referenceInfo
-source
1.3
-target
1.1
-time
-verbose
-classpath
C:\workspaces\org.aspectj\org.aspectj.ant.tests\..\lib\test\aspectjrt.jar
-argfile
C:\workspaces\org.aspectj\taskdefs\testdata\default.lst
-messageHolder
org.aspectj.bridge.MessageHandler
---- Full Classpath ---
Empty
---- Compiler Messages ---
abort ABORT -- (NoClassDefFoundError) org/apache/commons/logging/LogFactory
org/apache/commons/logging/LogFactory
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
	at org.aspectj.weaver.tools.CommonsTraceFactory.<init>(CommonsTraceFactory.java:17)
	at java.lang.Class.newInstance0(Native Method)
	at java.lang.Class.newInstance(Class.java:232)
	at org.aspectj.weaver.tools.TraceFactory.<clinit>(TraceFactory.java:35)
	at org.aspectj.weaver.World.<clinit>(World.java:114)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:679)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:224)
	at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:164)
	at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
	at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
	at org.aspectj.tools.ajc.Main.run(Main.java:367)
	at org.aspectj.tools.ajc.Main.runMain(Main.java:246)
	at org.aspectj.tools.ajc.Main.main(Main.java:86)
]]>       </programlisting>

        </sect2>
    </sect1>
</chapter>