JSP compilation performance problem due to bad .jar and .zip files
 Technote (FAQ)
 
Problem
After upgrading WebSphere® Appllication Server 3.5 to WebSphere Appllication Server 4.0.1 on z/OS®, the JSP™ compilation time had increased considerably. It was determined that while the JSP was compiling, CPU and the I/O counters experienced performance problems.
 
 
Solution
The prime cause of this slow compilation was due to the classpath specified in was.conf, that contained an archive file that was bad.

The archive file had been created by feeding the name of each of its individual component files to the archiver program. A listing of the archive (jar -tvf file.jar) showed that there were no entries for the directories. For example, in order to archive the files /somepath/dirA/file1, /somepath/dirA/file2 and /somepath/dirB/file3, a properly formed archive should contain the following entries:

/somepath/

/somepath/dirA/

/somepath/dirA/file1

/somepath/dirA/file2

/somepath/dirB/

/somepath/dirB/file3

But this particular archive contained only:

/somepath/dirA/file1

/somepath/dirA/file2

/somepath/dirB/file3

This bad archive forced the Java compiler to reread the archive in a very slow mode at each invocation.

To correct this error, you should explode and recreate the archive, this time by giving the name of the whole subdirectory so that the archiver will automatically create the directory entries.

EXAMPLE:

If you have a directory javax with files and subdirectories and create a jar file from it with a tool. However, your tool incorrectly creates the file with an enumeration of files instead of an enumeration of directories. You can duplicate this behavior using the command:
jar -cvf bad.jar javax/resource/*.class javax/resource/cci/*.class

If you enter the following command:
jar -tvf bad.jar
you can see that the directory entries are missing in this archive. If this bad.jar file is inserted in the WebSphere Application Server classpath, it will produce the performance problem.

You can resolve this problem by fixing the file by following these steps:

mkdir good # create a clean dir
cd good
jar -xvf ../bad.jar # to recreate the dir tree
jar -cvf ../good.jar # and archive it correctly

If you issue:
jar -tvf ../good.jar
you can see that this archive does contain directory entries, and that its files entries are the same as in the defective bad. jar file.

You should replace the bad jar with good.jar on your WebSphere Application Server system.

 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server Servlet Engine Multi-Platform 4.0.x Single Server, Standard
   
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server for z/OS > Hangs/Performance Degradation
Operating system(s): z/OS
Software version: 4.0.1
Software edition:
Reference #: 1079169
IBM Group: Software Group
Modified date: Oct 13, 2004