Courtesy WebSphere Serviceability guru Ann Paungam ...
When doing eclipse RCP development with the IBM JDK or simply when you are running eclipse it is necessary to understand the complete stacktrace of a particular exception. In order to make this happen you will need to add the -Xtrace options to the eclipse.ini file of your eclipse client like so
-Xtrace:maximal=mt,methods={org/eclipse/core/runtime/preferences/InstanceScope.getNode},trigger=method{org/eclipse/core/runtime/preferences/InstanceScope.getNode,javadump,,,5}
-Xtrace:maximal=mt,methods={org/eclipse/core/runtime/preferences/InstanceScope.InstanceScope},trigger=method{org/eclipse/core/runtime/preferences/InstanceScope.InstanceScope,javadump,,,5}
-Xtrace:maximal=mt,methods={org/eclipse/core/resources/ResourcesPlugin.getWorkspace},trigger=method{org/eclipse/core/resources/ResourcesPlugin.getWorkspace,javadump,,,5}
These will capture all java stack traces when InstanceScope.getNode method InstanceScope.InstanceScope constructor and ResourcesPlugin.getWorkspace are called. This will only work with the IBM JDKs or JREs and is extremely useful when developing in eclipse or developing RCP applications for eclipse.
By default, the javacores are generated to the Eclipse Home directory (eg: where the Eclipse.exe is located). The value "5" in the last parameter for the example above is to limit the number of javacores that are generated to just 5. Refer to the official JDK documentation applicable to your release, such as the link below, for the various options that can be used to control your jvm tracing:
http://publib.boulder.ibm.com/infocenter/javasdk/v1r4m2/index.jsp?topic=%2Fcom.ibm.java.doc.diagnostics.142j9%2Fhtml%2Fjvmtrdrcontrol.html&path=1_5_10_3_1
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.