The customer email below explained it very well:
-------- Original Message --------
Subject: JNLP version based protocol fails with war files.
Date: Fri, 22 Jun 2001 16:05:58 -0700
From: "Prasanth Pallamreddy" <###@###.###>
To: <###@###.###>
CC: <###@###.###>, <###@###.###>
Hi Rene,
I am an engineer with BEA Systems. We are seeing the following error using
Version Based protocol while deploying an application as a war file.
Everything works fine if we deploy the application as an exploded structure.
I am running this on WebLogic 6.0 server.
I figured out that RescourceCatalog.scanDirectory() is doing a
ServletContext.getRealPath() on a war file which will always return null. So
we are seeing the NPE.
Servlet 2.2 api docs say that getRealPath() will return null in case of a
war file.
http://java.sun.com/products/servlet/2.2/javadoc/javax/servlet/ServletContex
t.html#getRealPath(java.lang.String)
as such
File file = new File(_servletContext.getRealPath(s)) will always throw a NPE
in case of war files.
============================================================================
=====================
Exception on serverside
java.lang.NullPointerException
at java.io.File.<init>(Unknown Source)
at
com.sun.javaws.servlet.ResourceCatalog.scanDirectory(ResourceCatalog.java:21
0)
at
com.sun.javaws.servlet.ResourceCatalog.lookupResource(ResourceCatalog.java:8
9)
at
com.sun.javaws.servlet.JnlpDownloadServlet.handleVersionRequest(JnlpDownload
Servlet.java:175)
at
com.sun.javaws.servlet.JnlpDownloadServlet.locateResource(JnlpDownloadServle
t.java:155)
at
com.sun.javaws.servlet.JnlpDownloadServlet.handleRequest(JnlpDownloadServlet
.java:109)
at
com.sun.javaws.servlet.JnlpDownloadServlet.doGet(JnlpDownloadServlet.java:86
)
at javax.servlet.http.HttpServlet.doHead(HttpServlet.java:313)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:757)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:263)
at
weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java
:200)
at
weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletCo
ntext.java:2351)
at
weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java
:1951)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:137)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:120)
============================================================================
======================
Exception on the Java Web Start client.
Missing version field in response from server when accessing resource:
(http://localhost:7001/jnlpex/version/version1.jar, 1.0)
JNLPException[category: Download Error : Exception: null : LaunchDesc:
null ] at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
at
com.sun.javaws.cache.DownloadProtocol.getDownloadSize(Unknown Source) at
com.sun.javaws.LaunchDownload.downloadJarFiles(Unknown Source) at
com.sun.javaws.LaunchDownload.downloadEagerorAll(Unknown Source) at
com.sun.javaws.Launcher.downloadResources(Unknown Source) at
com.sun.javaws.Launcher.handleApplicationDesc(Unknown Source) at
com.sun.javaws.Launcher.handleLaunchFile(Unknown Source) at
com.sun.javaws.Launcher.run(Unknown Source) at
java.lang.Thread.run(Thread.java:479)
============================================================================
======================
Thanks
Prasanth Pallamreddy
BEA Systems.