United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4474021 JNLP version based protocol fails with war files
JDK-4474021 : JNLP version based protocol fails with war files

Details
Type:
Bug
Submit Date:
2001-06-25
Status:
Resolved
Updated Date:
2002-04-16
Project Name:
JDK
Resolved Date:
2002-03-20
Component:
deploy
OS:
windows_nt,windows_2000
Sub-Component:
webstart
CPU:
x86
Priority:
P4
Resolution:
Fixed
Affected Versions:
1.0.1
Fixed Versions:
1.2.0 (1.2)

Related Reports
Duplicate:

Sub Tasks

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

                                    

Comments
EVALUATION

investigate for hopper
###@###.### 2002-01-17

We can not verify the fix as described in procedure by developer. We don't have
WebLogic Server 6.0 at all.
###@###.### 2002-04-08
                                     
2002-01-17
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
1.2

FIXED IN:
1.2

INTEGRATED IN:
1.2


                                     
2004-08-31



Hardware and Software, Engineered to Work Together