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.
|