By: Christopher Moeller
Abstract: Troubleshooting guide for Otimizeit on Linux
If your DISPLAY environment
variable is set to a display that does not exist, the CCoverage script fails
with the message "Class not found: intuitive.optit.coverage.CodeCoverage".
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:
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.
My application ran successfully, however the Optimizeit Code Coverage is not
working correctly. Most of the classes show 0% of coverage, mots of the buttons
Optimizeit Code Coverage
Audit System runs inside the same virtual machine as the tested application.
If the tested application ends, the virtual machine exits and Optimizeit loses
contact with its Audit System and cannot retrieve coverage data (an alert saying
"Test program exited" pops up in Optimizeit).
To resolve this problem,
Optimizeit Code Coverage provides an option to disable the Java method System.exit().
This option can be enabled either by using the option VM cannot exit in the
settings editor or by using the command line option "-noexit" (java ... intuitive.audit.Cover
-noexit ...). That way the virtual machine will not exit when your application
ends. Use the Stop button in Optimizeit Code Coverage to exit the program when
your testing is complete.
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.
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 test 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.
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. :
In order to do that:
For additional developer
support options, please visit http://www.borland.com/devsupport
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.
Here are the most common issues:
- you are using the JDK 1.2.x production release rather then the JDK 1.2.x reference
implementation. Make sure to read the JDK 1.2
section for more information
- in your application server configuration, the LD_LIBRARY_PATH (or native library
path) does not include the Optimizeit lib directory. When you configure an application
server with Optimizeit and JDK 1.2, you add the parameter -Xruncci (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 libcci.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.
I cannot attach from the Optimizeit GUI? Which port should I use to attach?
When I attach from the Optimizeit GUI no coverage 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 test the virtual machine of your application server and
get the coverage information for your servlets/JSPs/EJBs. Optimizeit uses a
port to get the coverage 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 1472. If you
start your application with Optimizeit from a script, the port is specified
in the script.
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 testing
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 testing session 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 testing
of BusyApp with the JDK 1.3.1, setting the size of the Java heap to 256 Mb:
Some X-servers, including
Exceed, have problems with Swing applications. Fonts are too big, windows are
the wrong size...
The best way to test remotely is to run the Optimizeit GUI locally. If you test
remotely from your Windows platform on your Linux 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:
Why can't I test applets with my JRE?
When you test 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 test applets .
However you can still test applets with a JRE from Optimizeit by following these
- 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"
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