Name: nt126004 Date: 07/25/2002
FULL PRODUCT VERSION :
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)
also:
java version "1.4.1-beta"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1-beta-b14)
Java HotSpot(TM) Client VM (build 1.4.1-beta-b14, mixed mode)
On the client, java web start 1.0.1 and 1.2 beta -> differences outlined below
Also: the version of tomcat that comes with the java web services developer
pack 1.0
FULL OPERATING SYSTEM VERSION : Microsoft Windows 2000
[Version 5.00.2195]
A DESCRIPTION OF THE PROBLEM :
If the application is packaged in a war file, jar
differencing does not work, as the class
com.sun.javaws.servlet.JarDiffHandler uses
ServletContext.getRealPath to find the two jars to
differ. However, as stated in the docs for that method,
it will return null if the context refers to a war file.
In web start 1.0.1 this null file name will lead to a null
pointer exception. In web start 1.2, this null file name
means that no attempt is made to create the jar difference
file and the full version is returned instead. This means
that there is no way to package a web start application
into a war file and take advantage of jar differencing.
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Package jars for web start application into war file
2. Run the application on a client
3. Update one or more of the jars, changing the version
number
4. repackage into a new war file and deploy to the server
5. launch the application again from the client. At this
point, a .jardiff file should be created, instead I get the
following output when the logLevel attribute is set to
DEBUG in the web.xml file:
JnlpDownloadServlet(3): Resource returned: /app/winner2-
v1.16.jar
JnlpDownloadServlet(3): Generating JarDiff for winner2.jar
1.15->1.16
JnlpDownloadServlet(2): Failed to generate JarDiff for
winner2.jar 1.15->1.16
EXPECTED VERSUS ACTUAL BEHAVIOR :
I expect a jardiff file to be created, instead the full new
jar is returned in web start 1.2. In web start 1.0.1 a null
pointer exception is thrown.
I belive this all revolves around the call to
ServeltContext.getRealPath which returns null if the
context maps to a war file.
The fact that this threw a null pointer exception in web
start 1.0.1 but returns the full jar in web start 1.2 means
that this must have been a known bug that was looked at for
1.2.
However, this "fix" has effectively broken jar
differencing/incremental updates for applications that are
deployed in a war file.
ERROR MESSAGES/STACK TRACES THAT OCCUR :
JnlpDownloadServlet(3): Resource returned: /app/winner2-v1.16.jar
JnlpDownloadServlet(3): Generating JarDiff for winner2.jar 1.15->1.16
JnlpDownloadServlet(2): Failed to generate JarDiff for winner2.jar 1.15->1.16
REPRODUCIBILITY :
This bug can be reproduced always.
CUSTOMER WORKAROUND :
The only workaround I can find it to unpackage the
application on disk in tomcat. If it is left in the war
file jar differencing fails. This is not an acceptable
solution for our finished product.
Because we are relying on features in web start 1.2 we are
targetting jre 1.4.1, so I am hoping this issue will be
resolved by then. For our product we expect the difference
in size between new jars and jardiff files to be several
megabytes, so a fix for this is essential for us.
(Review ID: 159449)
======================================================================