Simplified Instructions: (For more detailed instructions see below...)
Obtain the tool files: Throwable.jar and throwableServlets.jar.
Also select exceptions35.txt or exceptions40.txt based on the version of
WAS.
copy Throwable.jar to <was_install>/classes.
unjar throwableServlets.jar to <was_install>/classes
copy exceptions<35|40>.txt to <was_install>/properties/exceptions.txt
(yes, this file must be renamed to exceptions.txt).
For the AdminServer:
I . Update admin.config to make Throwable.jar part of the JVM
bootclasspath for the AdminServer as follows: Edit <was_install>/bin/admin.config.
Locate the line containing adminServerJvmArgs and update it so that
the text immediately after the "=" is : -Xbootclasspath:<was_install>/classes/Throwable.jar
e.g. com.ibm.ejs.sm.util.process.Nanny.adminServerJvmArgs=-Xbootclasspath/p:c:/WebSphere/AppServer/classes/Throwable.jar
-Xmx....
Note: for Windows NT/2000 running WebSphere 3.x do not use the above
syntax because java does not support -Xbootclasspath/p. Instead use:
com.ibm.ejs.sm.util.process.Nanny.adminServerJvmArgs=-Xbootclasspath:c:/WebSphere/AppServer/classes/Throwable.jar;c:/WebSphere/AppServer/jdk/jre/lib/rt.jar
-Xmx...
II. Update admin.config to add 3 more startup properties to the
admin server as follows: Edit <was_install>/bin/admin.config.
Locate the line containing adminServerJvmArgs and update it
so that it ends with: -DenableExceptionTrace=exclude -DenableExceptionTraceDelay
-DexceptionsFile=<was_install>/properties/exceptions.txt
e.g. com.ibm.ejs.sm.util.process.Nanny.adminServerJvmArgs=-Xbootclasspath....
-Xmx... -D..... -D..... -DenableExceptionTrace=exclude
-DenableExceptionTraceDelay=90 -DexceptionsFile=c:/WebSphere/AppServer/properties/exceptions.txt
For the ApplicationServer:
Note the same JVM properties that are applied to the AdminServer are
to be applied to each application server. The difference is that
the JVM arguments for the application server are updated using the AdminConsole.
Locate the Application Server property page for each application server
using the AdminConsole and update the JVM arguments to start with the following:
-Xbootclasspath...<was_install>/classes/Throwable.jar.... (follow the
same rules as above for bootclasspath differences between JVM that support
the bootclasspath/p and those that do not). Finally, the JVM arguments
must end with:
-DenableExceptionTrace=exclude -DenableExceptionTraceDelay -DexceptionsFile=<was_install>/properties/exceptions.txt
Restart the AdminServer and Application Servers for the changes to take effect.
OPTIONAL DETAILED INSTRUCTION
(ii) Notation used
(i) Installation
(I) Mandatory JVM CmdLine options:
NOTE: These options are shown on several lines for readability. They should be entered as a single contiguous string in the "Command line arguments" box in the "Advanced JVM settings" panel to trace <your_app_server>, or as an argument to the com.ibm.ejs.sm.util.process.Nanny.adminServerJvmArgsvariable in the <WAS_HOME>/bin/admin.config file to trace the admin server.
Parameter: -Xbootclasspath:<location of Throwable.jar>\Throwable.jar
;<JRE_ROOT>\lib\rt.jar;<JRE_ROOT>\lib\i18n.jar;<WAS_HOME>\lib\j2ee.jar
;<JRE_ROOT>\classes
NOTE for UNIX: The command format is slightly different.
-Xbootclasspath/p:<location of Throwable Jar>/Throwable.jar
:<WAS_HOME>/java/jre/lib/rt.jar:<WAS_HOME>/java/jre/lib/i18n.jar
:<WAS_HOME>/lib/j2ee.jar
Description: Used to place the instrumented JAR file first in the classpath.
Example:
-Xbootclasspath:c:\tmp\Throwable.jar;c:\WebSphere\AppServer\jre\lib\rt.jar
;c:\WebSphere\AppServer\jre\lib\i18n.jar
;c:\WebSphere\AppServer\lib\j2ee.jar;c:\WebSphere\AppServer\classes
NOTE for AIX: The example would look as follows. Substitute "/opt" for "/usr" for other UNIXes.
-Xbootclasspath/p:/tmp/Throwable.jar:/usr/WebSphere/AppServer/java/jre/lib/rt.jar:/usr/WebSphere/AppServer/java/jre/lib/i18n.jar
:/usr/WebSphere/AppServer/j2ee.jar:/usr/WebSphere/AppServer/classes
(II) How To Enable Tracing and Filtering at JVM Startup
If you want to trace an Application Server:
If you want to trace the Administrative Server:
Start or cycle the Administrative Server for the settings to take effect. Output will go to the console where you issue the <WAS_ROOT>\bin\startSever.bat (or <WAS_ROOT>/bin/startServer.sh for UNIX) command.
Optional JVM Startup CmdLine options
NamePurposeValid ValuesExamples
-DexceptionsFileAllows user to specify path an exceptionsFile
which contains exceptions that will be added to the exceptions_to_be_printed
listPath to file-DexceptionsFile=C:\WebSphere\ASV35\properties\exceptions.txt
Example
of what this file should look like? Fully qualified exception class name,
one on each line? -DWAS_ROOTThis parameter is ignored if the -DexceptionsFile
is specified. If the -DexceptionsFile is not specified this parameter is
used to locate the default file properties file for printedExceptions:
<WAS_ROOT>/properties/exceptions.txt String pointing to WebSphere
root full path of parent directory of exceptions.txt(?)
Or does default name include /properties/ already?-DWAS_ROOT=C:\WebSphere\ASV35
-DenableExceptionTraceused to turn on Exception Tracing and possibly filtering
at JVM startup If this option is absent, does it
mean that presence of Throwable.jar has no effect?"on" or "true"
to turn on tracing without filtering. "filter" - to turn on tracing and
filtering. The exceptions specified via the -DexceptionsFile properties
or the default file of <WAS_ROOT>/properties/exceptions.txt will be
the ones printed any other value turns off any &
all tracing?-DexceptionTrace=on * If Tracing is enabled at JVM startup
and no filtering is enabled the amount of exceptions outputed will be huge
which could lead to the failure of the start operation. To avoid this JVM
startup failure increase the 2 Ping timeouts of the AppServer found on
the advanced tab : Ping timeout and Ping initial timeout.. I increased
them both to 9999 and the JVM started correctly-DfilterExceptionsto turn
on filtering. If -DexceptionTrace is then set to "filter" then this is
ignored. If you have to have the enableExceptionTrace
anyway, what's the need for this guy? "on" or "true" - case insensitive-DfilterExceptions
Realistic Examples:These are shown here on multiple lines for readability but each option should be entered as one contiguous string.
Example (1):
-Xbootclasspath:c:\tmp\Throwable.jar;c:\WebSphere\AppServer\java\jre\lib\rt.jar
;c:\WebSphere\AppServer\java\jre\lib\i18n.jar
;c:\WebSphere\AppServer\lib\j2ee.jar;c:\WebSphere\AppServer\classes
-DWAS_ROOT=C:\WebSphere\AppServer -DenableExceptionTrace=exclude
NOTE for AIX: The command format is slightly different. Substitute "/opt" for "/usr" for other UNIXes.
-Xbootclasspath/p:/tmp/Throwable.jar:/usr/WebSphere/AppServer/java/jre/lib/rt.jar
:/usr/WebSphere/AppServer/java/jre/lib/i18n.jar
:/usr/WebSphere/AppServer/lib/j2ee.jar:/usr/WebSphere/AppServer/classes
-DWAS_ROOT=/usr/WebSphere/AppServer -DenableExceptionTrace=exclude
Description (1): This enables exception tracing and exception filtering. It will use the exceptions located in the default exceptions file:
C:\WebSphere\AppServer\properties\exceptions.txt. (<WAS_ROOT>/properties/exceptions.txt for UNIX.) If this file doesn't exist then no exceptions will be excluded, i.e. all exceptions will be printed. This would be the equivalent of set enableExceptionsTrace=on
Example ( 2)
-Xbootclasspath:c:\tmp\Throwable.jar;c:\WebSphere\AppServer\java\jre\lib\rt.jar
;c:\WebSphere\AppServer\java\jre\lib\i18n.jar
;c:\WebSphere\AppServer\lib\j2ee.jar;c:\WebSphere\AppServer\classes
-DexceptionsFile=C:\tmp\exceptions.txt -DenableExceptionTrace=include
NOTE for AIX: The command format is slightly different. Substitute "/opt" for "/usr" for other UNIXes.
-Xbootclasspath/p:/tmp/Throwable.jar:/usr/WebSphere/AppServer/java/jre/lib/rt.jar
:/usr/WebSphere/AppServer/java/jre/lib/i18n.jar
:/usr/WebSphere/AppServer/lib/j2ee.jar:/usr/WebSphere/AppServer/classes
-DexceptionsFile=/tmp/exceptions.txt -DenableExceptionTrace=include
Description (2) : Same as above except it will use look in the file C:\tmp\exceptions.txt (or /tmp/exceptions.txt for UNIX) for the exceptions to include. If the file is not found or if it is empty then no exceptions will be included which is the equivalent of setting enableTraceExceptions=off
Example (3)
-Xbootclasspath:c:\tmp\Throwable.jar;c:\WebSphere\AppServer\java\jre\lib\rt.jar
;c:\WebSphere\AppServer\java\jre\lib\i18n.jar
;c:\WebSphere\AppServer\lib\j2ee.jar;c:\WebSphere\AppServer\classes
-DexceptionsFile=C:\tmp\exceptions.txt -DenableExceptionTrace=on
-DfilterExceptions=true
NOTE for AIX: The command format is slightly different. Substitute "/opt" for "/usr" for other UNIXes.
-Xbootclasspath/p:/tmp/Throwable.jar:/usr/WebSphere/AppServer/java/jre/lib/rt.jar
:/usr/WebSphere/AppServer/java/jre/lib/i18n.jar
:/usr/WebSphere/AppServer/lib/j2ee.jar:/usr/WebSphere/AppServer/classes
-DexceptionsFile=/tmp/exceptions.txt -DenableExceptionTrace=on
-DfilterExceptions=true
Description (3) This would results in all exceptions being printed. Performance of server startup will be very slow.
(III) Tracing and Filtering After JVM Startup- This technique will allow you to modify the tracing of one application server at a time.
You will need to get two pieces of information from <your_app_server> to run these servlets.
1) <your_port> -Expand WebSphere Administrative Domain -> Nodes
2) <context_root> -Expand WebSphere Administrative Domain -> Nodes -> <your_app_server>
NOTE: If you are not configuring your system to modify the tracing for the "Default server" you may have to define a new port under "Virtual Hosts" as outlined here.
Modifying settings
Viewing current Settings
Enabling/disabling tracing/filtering