Optimizeit Thread Debugger Troubleshooting FAQ for Linux

By: Christopher Moeller

Abstract: Troubleshooting FAQ for Optimizeit Thread Debugger

Troubleshooting

I cannot start the testing of my application from Optimizeit Thread Debugger

  1. I cannot start Optimizeit. The Optimizeit script fails with the error "Class not found: intuitive.optit.threadd.ThreadD"
  2. My application starts correctly, however an alert explaining that Optimizeit failed to attach is displayed
  3. When starting my application, I get an alert reporting a Class not found
  4. When starting my applet, the console throws an error: "java.util.MissingResourceException: Can't find resource at java.util.ResourceBundle.getObject"
  5. When attaching to my application, nothing happens and after a few seconds an error "Communication not established" is shown.
  6. When starting my application from the command line, an error "*** panic: GC: getStickySystemClass failed:" is displayed
    When starting my application from the command line, an error "Cannot find intuitive.audit.threadd.ThreadDNotifier class" is displayed
  7. The previous statements did not help. What should I do next?

I cannot start my application server with Thread Debugger

  1. My application server no longer starts since I configured it with Optimizeit
  2. I cannot attach from the Optimizeit GUI? Which port should I use to attach?

  3. When I attach from the Optimizeit GUI no profiling information is displayed?

I have a problem during the testing session

  1. While testing my application, my application stops or crashes unexpectedly
  2. While testing my application, the application stops, the console shows a java.lang.OutOfMemoryError

Miscellaneous

  1. The Optimizeit GUI looks wrong. The text is clipped, the windows are the wrong size
  2. Why can't I profile applets with my JRE?

I cannot start the testing of my application from Optimizeit

1. I cannot start Optimizeit. The Optimizeit script fails with the error "Class not found: intuitive.optit.threadd.ThreadD"

If your DISPLAY environment variable is set to a display that does not exist, the Optimizeit script fails with the message "Class not found: intuitive.optit.threadd.ThreadD". This message is sent by the virtual machine that Optimizeit uses and is bogus. Make sure to set your DISPLAY to a correct value.
For example on a machine named asterix, the DISPLAY is set with the command:
export DISPLAY=asterix:0

2. My application starts correctly, however an alert explaining that Optimizeit failed to attach is displayed.

Optimizeit uses a default connection time-out of 20 seconds to attach to the virtual machine.
In some environments, the Optimizeit audit system may require more than 20 seconds to initialize. If this happens, select "Preferences" from the edit menu, select the "Launch" section and increase the connection time-out value.

3. When starting my application, I get an alert reporting a Class not found.

This error is very likely related to a CLASSPATH setting problem. Open the setting editor from the File/Settings menu, and make sure that the Class path section includes the paths to the packages and classes required by your application.

4. When starting my applet, the console throws an error: "java.util.MissingResourceException: Can't find resource at java.util.ResourceBundle.getObject".

Optimizeit starts your applet in the Sun applet viewer in order to profile it. The applet viewer throws that error when the HTML file of your applet specifies the size of your applet in percent. Make sure that the HTML file you are using to start your applet uses hard values for the width and height.

5. When attaching to my application, nothing happens and after a few seconds an error "Communication not established" is shown.

This error occurs when attaching to the wrong port number, or when attaching to the wrong audit system. For example, this happens when attaching to an application server port instead of attaching to the audit system port number. This also happens when trying to attach from Optimizeit Thread Debugger to Optimizeit Profiler or Code Coverage audit system.

6. When starting my application from the command line, an error "*** panic: GC: getStickySystemClass failed:" is displayed.
When starting my application from the command line, an error "Cannot find intuitive.audit.threadd.ThreadDNotifier class" is displayed

This error is displayed because the bootclasspath has not been changed to include Optimizeit Thread Debugger classes. Optimizeit Thread Debugger needs to add some classes very early in the virtual machine initialization. Make sure to add the following option when starting the virtual machine: -Xbootclasspath/a:<OptIt_Dir>/lib/oibcp.jar

7. The previous statements did not help. What should I do next?

The best way to investigate the cause of the problem is to start your application from the command line.
In the following <OptIt_Dir> is the directory where you installed Optimizeit (e. g. : /home/jay/OptimizeitSuite)
In order to do that:

  • open a command prompt
  • set your LD_LIBRARY_PATH to include the Optimizeit lib directory:

  • export LD_LIBRARY_PATH=<OptIt_Dir>/lib:$LD_LIBRARY_PATH
  • set your CLASSPATH to include the Optimizeit optit.jar package:

  • export CLASSPATH=<OptIt_Dir>/lib/optit.jar:$CLASSPATH
  • start your application with Optimizeit:
    • with Sun's JDK 1.2.x and JDK 1.3:
      java -classic -Xruntdi -Xbootclasspath/a:<OptIt_Dir>/lib/oibcp.jar -Djava.compiler=NONE MyApplication
    • with Sun's JDK 1.3.1, 1.4 and IBM's JDKs:

    • java -Xboundthreads -Xruntdi -Xbootclasspath/a:<OptIt_Dir>/lib/oibcp.jar MyApplication
    or if you are profiling an applet:
    • with Sun's JDK 1.2.x and JDK 1.3:
      java -classic -Xruntdi -Xnoclassgc -Djava.compiler=NONE sun.applet.AppletViewer MyApplet.html
    • with Sun's JDK 1.3.1, 1.4 and IBM's JDKs:
      java -Xboundthreads -Xruntdi -Xbootclasspath/a:<OptIt_Dir>/lib/oibcp.jar sun.applet.AppletViewer MyApplet.html

For additional developer support options, please visit http://www.borland.com/devsupport


I cannot start my application server with Thread Debugger

1. My application server no longer starts since I configured it with Optimizeit.

First, make sure to check the outputs and/or log files of your application server for any error message.
Make sure that in your application server configuration, the LD_LIBRARY_PATH (or native library path) includes the Optimizeit lib directory. When you configure an application server with Optimizeit and JDK 1.2, you add the parameter -Xruntdi (or -Xrunoii for a generic integration with the other Optimizeit tools). When the virtual machine is started with this parameter, it loads the Optimizeit library libtdi.so (or liboii.so if you used -Xrunoii). If it cannot find it in the LD_LIBRARY_PATH, the virtual machine fails to start. Make sure that the LD_LIBRARY_PATH, or the library path of your application server points to the Optimizeit lib directory.

2. I cannot attach from the Optimizeit GUI? Which port should I use to attach?
When I attach from the Optimizeit GUI no profiling information is displayed?

When you integrate Optimizeit with an application server, you start the Optimizeit audit system inside the virtual machine of the application server. By attaching the Optimizeit GUI to the audit system, you profile the virtual machine of your application server and get the thread information for your servlets/JSPs/EJBs. Optimizeit uses a port to get the profiling information from the audit system running in your application server. This port is only used by Optimizeit and is not related to any port of your application server. The default value for that port is 1471. If you start your application with Optimizeit from a script, the port is specified in the script (after the -Xruntdi extra java argument). Make sure to use the correct port when you attach.


I have a problem during the testing session.

1. While testing my application, my application stops or crashes unexpectedly

Take a look at the external console. It may give more information on what went wrong. If you do not have an external console, it means you have not selected the option "Open a console" in the settings editor. Make sure to select the option, and start the profiling again.

2. While testing my application, the application stops, the console shows a java.lang.OutOfMemoryError

The virtual machine ran out of memory. You can increase the size of the Java heap by using the extra Java parameters -ms -mx (JDK 1.1) or -Xms -Xmx (JDK 1.2 and 1.3). For example -Xms128m -Xmx128m sets the size of the Java heap to 128 Mb.
If you are starting the profiling from Optimizeit, add those parameters in the settings editor, in the field "Extra Java parameters".
If you are starting your application from the command line, add those parameters to the command line. The following command line starts for example the profiling of BusyApp with the JDK 1.3.1, setting the size of the Java heap to 256 Mb:
java -Xruntdi -Xbootclasspath/a:<OptIt_Dir>/lib/oibcp.jar -Xms256m -Xmx256m BusyApp


Miscellaneous

1. The Optimizeit GUI looks wrong. The text is clipped, the windows are the wrong size.

Some X-servers, including Exceed, have problems with Swing applications. Fonts are too big, windows are the wrong size...
The best way to profile remotely is to run the Optimizeit GUI locally. If you profile remotely from your Windows platform on your Solaris machine, make sure to use Optimizeit for Windows on the Windows platform.

Here are instructions on how to configure Exceed 7 to display the right fonts with Optimizeit:

  • Open the Exceed Xconfig window from the Windows Start menu, Hummingbird.../Exceed/Xconfig
  • Double click the Font icon to open the "Font Settings" window
  • Click the "Font Database..." button
  • Unselect the option "Automatic Font Substitution" then click OK
  • Restart Exceed

2. Why can't I profile applets with my JRE?

When you profile applets with JDK 1.2 or 1.3, Optimizeit runs your applet in the applet viewer using oldjava rather than java, in order to avoid security exceptions. JRE 1.2 and 1.3 do not include oldjava. This is why Optimizeit requires a JDK to profile servlets.
However you can still profile applets with a JRE from Optimizeit by following these steps:
- edit the java.policy file of your JRE located under the lib/security directory of your jre
- at the end of the file include the following lines:
  grant codeBase "file:<OptIt_Dir>/lib/optit.jar" {
   permission java.security.AllPermission;
  };

  You should replace <OptIt_Dir> with the directory where you installed Optimizeit (for example: /home/jay/OptimizeitSuite).
- set the environment variable OI_APPLET_JRE to true

 


Copyright (c) 1997, 1998, 1999, 2000, 2001 Borland. All rights reserved. Specifications subject to change without notice.
Optimizeit is a trademark of Borland.
Java and all Java-based trademarks and logos are trademarks or registered trademarks of Sun Microsystems, Inc.
All other brand names and products are trademarks or registered trademarks of their respective holders.


Server Response from: ETNASC03