ORB and EJS Trace in WebSphere Application Server

Technote (FAQ)
Problem
How do you trace the ORB and the com.ibm.ejs components of the WAS admin
server, WAS application server or application clients?
Solution
How to set up ORB and com.ibm.ejs trace for the WAS 3.5 Admin Server:
  1. Set up tracing of the WAS 3.5 Admin Server:
    1. Make sure the application server and admin server are not running (no java processes are running)
  2. Add the following lines to the admin.config file:
    • com.ibm.CORBA.Debug=true
    • com.ibm.CORBA.CommTrace=true
    • com.ibm.ejs.sm.adminServer.traceString="ORBRas=all=enabled:com.ibm.ejs.ns.*=all=enabled:com.ibm.ws.naming.*=all=enabled"
    • com.ibm.ejs.sm.adminServer.traceOutput=<yourTraceDirectory>/adminServer.trace
      a. Start the WebSphere Admin Server
      b. Recreate problem
      c. Stop WebSphere
  3. Send the resulting file, adminServer.trace, to IBM Support via ftp or email

How to set up ORB trace for the application server in WAS 3.5:
  1. Start the WAS Admin and Application Servers
    1. Make sure the application server and admin server are started (each is a separate java process)
  2. Start the Admin Console
  3. Use Admin Console to enable tracing:
    1. Enter the following in the "Command line arguments" field of the Application Server:
      • -Dcom.ibm.CORBA.Debug=true -Dcom.ibm.CORBA.CommTrace=true
    2. Press Apply button and wait for completion message
    3. Enter the following in the "Trace specification" field off the "Advance" tab of the Application Server:
      • ORBRas=all=enabled
    4. Enter the following in the "Trace output file" field off the "Advance" tab of the Application Server:
      • Specify trace file, e.g. <yourTraceDirectory>/myAppServer.trace
    5. Press Apply button and wait for completion message
    6. Right click on the Application Server and select Stop if the Application is running, and then wait for the completion message.
    7. Right click on the Application Server and select Start and wait for the completion message
  4. Recreate problem
  5. Stop Application Server
  6. Send the resulting file, myAppServer.trace, to IBM Support via ftp or email

How to set up ORB trace for the application server in WAS 4.0:
  1. Tracing a WAS 4.0 Application Server:
    1. Make sure the AdminServer is running and start the AdminConsole
    2. Choose the tracing application server then select "Services" tab
    3. Select OBJECT REQUEST BROKER, then press "Edit Properties" button
    4. Check on "Enable ORB Tracing" box
    5. OK
    6. Apply
    7. Select TRACE SERVICE, then press "Edit Properties" button
    8. Select "Specify" for the "Trace output file:" and give a full path and a file name
      c:\WebSphere\AppServer\logs\myAppServer_1_orb.trace
    9. OK
    10. Apply
    11. Recycle Application Server
  2. Recreate problem
  3. Send the resulting file, myAppServer.trace, to IBM Support via ftp or email

How to set up tracing for WAS stand-alone java client application or EJB client application:
Add the following java code to the client program:
    import com.ibm.ejs.ras.*;
    ...
    try {
    ComponentManager cm = Tr.getComponentManager();
    cm.processTraceString("ORBRas=all=enabled");

    // add the following line to pipe the output to stdout
    Tr.addTraceEventListener(new TraceLogger());

    // or add the following to pipe the output to a file
    java.io.FileOutputStream fos = new
    java.io.FileOutputStream(fileName);
    Tr.addTraceEventListener(new TraceLogger(fos));
    }
    catch(Exception ex)
    {
    }

or, add the following properties for java command line for stand-alone java program:
    -Dcom.ibm.CORBA.Debug=true
    -Dcom.ibm.CORBA.CommTrace=true
    -Dorg.omg.CORBA.ORBClass=com.ibm.CORBA.iiop.ORB or
    -Dorg.omg.CORBA.ORBClass=com.ibm.rmi.iiop.ORB

Send the resulting file, myAppServer.trace, to IBM Support via ftp or email

How to perform ORB and com trace in the Admin Console on Windows:
The following are the steps to collect Admin Client Comm trace on Windows platform.
  1. Copy WebSphere\AppServer\bin\adminclient.bat to a backup file
  2. Edit WebSphere\AppServer\bin\adminclient.bat
    1. Change from
      • goto NODEBUG
      • :DEBUG
      • set DEBUGOPTS=-traceString "com.ibm.*=all=enabled"
    2. to
      • goto NODEBUG
      • :DEBUG
      • set DEBUGOPTS=-traceString "com.ibm.*=all=enabled:ORBRas=all=enabled"
    3. Add the two trace parameters to the following "%JAVA_HOME%\bin\java" statement:
      • -Dcom.ibm.CORBA.Debug=true
      • -Dcom.ibm.CORBA.CommTrace=true
      • For example: %JAVA_HOME%\bin\java -Dcom.ibm.CORBA.Debug=true -Dcom.ibm.CORBA.CommTrace=true -Xminf0.15 -Xmaxf0.25 -classpath %WAS_CP% %CLIENTSAS% -Dcom.ibm.CORBA.principalName=%COMPUTERNAME%/AdminClient -Dserver.root=%WAS_HOME% com.ibm.ejs.sm.client.ui.EJSConsole %DEST% %DESTPORT% %DEBUGOPTS% %QUALIFYNAMES%
        goto END
    4. The statement should be in one continuous line. Add "%DEBUGOPTS%" also to the statement if "%DEBUGOPTS%" does not already exist:
      • if "%DEBUGOPTS%"=="" goto START
  3. Start the admin server has been started
  4. Start admin console using the following:
    • WebSphere\AppServer\bin\adminclient -v > adminClient.trace
  5. Send the resulting file, adminClient.trace, to IBM Support via ftp or email
How to perform ORB and com trace the Admin Console on Unix:
The following are the steps to collect Admin Client Comm trace on Windows platform.
  1. Copy /usr/WebSphere/AppServer/bin/adminclient.sh (or /opt/WebSphere/AppServer/bin/adminclient.sh) to a backup file
  2. Edit /usr/WebSphere/AppServer/bin/adminclient.sh
    1. Change from
      • elif [ "$1" = "debug"]
      • then
      • DEBUGOPTS='-traceString "com.ibm.*=all=enabled" '
    2. to
      • elif [ "$1" = "debug"]
      • then
      • DEBUGOPTS='-traceString "com.ibm.*=all=enabled:ORBRas=all=enabled" '
    3. Add the two trace parameters to the following "$JAVA_HOME/bin/java" statement:
      • -Dcom.ibm.CORBA.Debug=true
      • -Dcom.ibm.CORBA.CommTrace=true
      • For example: ???
  3. Start the admin server has been started
  4. Start admin console using the following:
    • /usr/WebSphere/AppServer/bin/adminclient.sh -v > adminClient.trace 2>&1
  5. Send the resulting file, adminClient.trace, to IBM Support via ftp or email











    Document Information

    Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, Object Request Broker (ORB)
    Operating system(s): Multi-Platform
    Software version: 3.5, 4.0, 5.0, 5.1, 6.0
    Software edition: Advanced
    Reference #: 1063687
    IBM Group: Software Group
    Modified date: 2002-09-04