You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198
  1. <chapter id="ajcore" xreflabel="AspectJ Core Files">
  2. <title>AspectJ Core Files</title>
  3. <sect1 id="ajcore-introduction">
  4. <title>Introduction</title>
  5. <para> When the compiler terminates abnormally, either because a particular kind of message was
  6. issued or an exception was thrown, an AspectJ core file will be produced. You will
  7. find it the working directory of the compiler and it will have a name that contains
  8. the date and time that the file was produced
  9. e.g. <literal>ajcore.20060810.173655.626.txt</literal>. The file contains details
  10. of the problem such as the exception thrown as well as information about the
  11. environment such as operating system and Java version. When submitting a bug,
  12. include this file whenever it is available.</para>
  13. <sect2 id="configuration" xreflabel="configuration">
  14. <title>Configuring dump files</title>
  15. <para> By default AspectJ will only create an <literal>ajcore</literal> file
  16. when an unexpected exception is thrown by the weaver or an
  17. <literal>abort</literal> message is
  18. issued. However it is possible to disable this feature or enable files to
  19. be produced under different circumstances. The table below lists the System
  20. properties that can be used to configure <literal>ajcore</literal> files. </para>
  21. <informaltable>
  22. <tgroup cols="3">
  23. <thead>
  24. <row>
  25. <entry>Property</entry>
  26. <entry>Default</entry>
  27. <entry>Description</entry>
  28. </row>
  29. </thead>
  30. <tbody>
  31. <row>
  32. <entry>
  33. <literal>org.aspectj.weaver.Dump.exception</literal>
  34. </entry>
  35. <entry>
  36. <literal>true</literal>
  37. </entry>
  38. <entry>
  39. Generate an <literal>ajcore</literal> files when an exception thrown.
  40. </entry>
  41. </row>
  42. <row>
  43. <entry>
  44. <literal>org.aspectj.weaver.Dump.condition</literal>
  45. </entry>
  46. <entry>
  47. <literal>abort</literal>
  48. </entry>
  49. <entry>
  50. Message kind for which to generate <literal>ajcore</literal>
  51. e.g. <literal>error</literal>.
  52. </entry>
  53. </row>
  54. <row>
  55. <entry>
  56. <literal>org.aspectj.dump.directory</literal>
  57. </entry>
  58. <entry>
  59. <literal>none</literal>
  60. </entry>
  61. <entry>
  62. The directory used for ajcore files.
  63. </entry>
  64. </row>
  65. </tbody>
  66. </tgroup>
  67. </informaltable>
  68. </sect2>
  69. <sect2 id="ajcore-examples" xreflabel="AJCore File Examples">
  70. <title>AJCore File Examples</title>
  71. <para> Below is an extract from an <literal>ajcore</literal> file. You will see
  72. details of the dump configuration as well as the exception (with stack trace) that
  73. is the source of the problem and any messages issued by the compiler. Most importantly
  74. the exact version of AspectJ is included. </para>
  75. <programlisting><![CDATA[
  76. ---- AspectJ Properties ---
  77. AspectJ Compiler DEVELOPMENT built on Tuesday Jul 25, 2006 at 13:00:09 GMT
  78. ---- Dump Properties ---
  79. Dump file: ajcore.20060810.173655.626.txt
  80. Dump reason: java.lang.NoClassDefFoundError
  81. Dump on exception: true
  82. Dump at exit condition: abort
  83. ---- Exception Information ---
  84. java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
  85. at org.aspectj.weaver.tools.CommonsTraceFactory.<init>(CommonsTraceFactory.java:17)
  86. at java.lang.Class.newInstance0(Native Method)
  87. at java.lang.Class.newInstance(Class.java:232)
  88. at org.aspectj.weaver.tools.TraceFactory.<clinit>(TraceFactory.java:35)
  89. at org.aspectj.weaver.World.<clinit>(World.java:114)
  90. at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:679)
  91. at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:224)
  92. at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:164)
  93. at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
  94. at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
  95. at org.aspectj.tools.ajc.Main.run(Main.java:367)
  96. at org.aspectj.tools.ajc.Main.runMain(Main.java:246)
  97. at org.aspectj.tools.ajc.Main.main(Main.java:86)
  98. ---- System Properties ---
  99. java.runtime.name=Java(TM) 2 Runtime Environment, Standard Edition
  100. sun.boot.library.path=C:\jdk1.3.1_16\jre\bin
  101. java.vm.version=1.3.1_16-b06
  102. java.vm.vendor=Sun Microsystems Inc.
  103. java.vendor.url=http://java.sun.com/
  104. path.separator=;
  105. java.vm.name=Java HotSpot(TM) Client VM
  106. file.encoding.pkg=sun.io
  107. java.vm.specification.name=Java Virtual Machine Specification
  108. user.dir=C:\workspaces\org.aspectj\org.aspectj.ant.tests
  109. java.runtime.version=1.3.1_16-b06
  110. java.awt.graphicsenv=sun.awt.Win32GraphicsEnvironment
  111. os.arch=x86
  112. java.io.tmpdir=C:\DOCUME~1\IBM_user\LOCALS~1\Temp\
  113. line.separator=
  114. java.vm.specification.vendor=Sun Microsystems Inc.
  115. java.awt.fonts=
  116. os.name=Windows XP
  117. java.library.path=C:\jdk1.3.1_16\jre\bin;...
  118. java.specification.name=Java Platform API Specification
  119. java.class.version=47.0
  120. os.version=5.1
  121. user.home=C:\Documents and Settings\IBM_user
  122. user.timezone=Europe/London
  123. java.awt.printerjob=sun.awt.windows.WPrinterJob
  124. file.encoding=Cp1252
  125. java.specification.version=1.3
  126. java.class.path=C:\workspaces\org.aspectj\aj-build\dist\tools\lib\aspectjtools.jar
  127. user.name=IBM_user
  128. java.vm.specification.version=1.0
  129. java.home=C:\jdk1.3.1_16\jre
  130. user.language=en
  131. java.specification.vendor=Sun Microsystems Inc.
  132. awt.toolkit=sun.awt.windows.WToolkit
  133. java.vm.info=mixed mode
  134. java.version=1.3.1_16
  135. java.ext.dirs=C:\jdk1.3.1_16\jre\lib\ext
  136. sun.boot.class.path=C:\jdk1.3.1_16\jre\lib\rt.jar;...
  137. java.vendor=Sun Microsystems Inc.
  138. file.separator=\
  139. java.vendor.url.bug=http://java.sun.com/cgi-bin/bugreport.cgi
  140. sun.io.unicode.encoding=UnicodeLittle
  141. sun.cpu.endian=little
  142. user.region=GB
  143. sun.cpu.isalist=pentium i486 i386
  144. ---- Command Line ---
  145. -d
  146. C:\workspaces\org.aspectj\org.aspectj.ant.tests\IncrementalAjcTaskTest-temp
  147. -g:none
  148. -deprecation
  149. -noExit
  150. -warn:-unusedImport
  151. -nowarn
  152. -XterminateAfterCompilation
  153. -preserveAllLocals
  154. -proceedOnError
  155. -referenceInfo
  156. -source
  157. 1.3
  158. -target
  159. 1.1
  160. -time
  161. -verbose
  162. -classpath
  163. C:\workspaces\org.aspectj\org.aspectj.ant.tests\..\lib\test\aspectjrt.jar
  164. -argfile
  165. C:\workspaces\org.aspectj\taskdefs\testdata\default.lst
  166. -messageHolder
  167. org.aspectj.bridge.MessageHandler
  168. ---- Full Classpath ---
  169. Empty
  170. ---- Compiler Messages ---
  171. abort ABORT -- (NoClassDefFoundError) org/apache/commons/logging/LogFactory
  172. org/apache/commons/logging/LogFactory
  173. java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
  174. at org.aspectj.weaver.tools.CommonsTraceFactory.<init>(CommonsTraceFactory.java:17)
  175. at java.lang.Class.newInstance0(Native Method)
  176. at java.lang.Class.newInstance(Class.java:232)
  177. at org.aspectj.weaver.tools.TraceFactory.<clinit>(TraceFactory.java:35)
  178. at org.aspectj.weaver.World.<clinit>(World.java:114)
  179. at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:679)
  180. at org.aspectj.ajdt.internal.core.builder.AjBuildManager.doBuild(AjBuildManager.java:224)
  181. at org.aspectj.ajdt.internal.core.builder.AjBuildManager.batchBuild(AjBuildManager.java:164)
  182. at org.aspectj.ajdt.ajc.AjdtCommand.doCommand(AjdtCommand.java:112)
  183. at org.aspectj.ajdt.ajc.AjdtCommand.runCommand(AjdtCommand.java:60)
  184. at org.aspectj.tools.ajc.Main.run(Main.java:367)
  185. at org.aspectj.tools.ajc.Main.runMain(Main.java:246)
  186. at org.aspectj.tools.ajc.Main.main(Main.java:86)
  187. ]]></programlisting>
  188. </sect2>
  189. </sect1>
  190. </chapter>