United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
JDK-6526243 : Java Web Start JNLPCachedJarURLConnection should override getHeaderField

Details
Type:
Bug
Submit Date:
2007-02-17
Status:
Closed
Updated Date:
2011-05-17
Project Name:
JDK
Resolved Date:
2011-05-17
Component:
deploy
OS:
generic,windows_xp
Sub-Component:
webstart
CPU:
x86,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
6
Fixed Versions:

Related Reports
Backport:
Duplicate:

Sub Tasks

Description
I just tried out the webstart version of jext at http://www.jext.org/ with 6.0:

On second launch the app succeeded. But after launching it takes lots of time (about a 1/2 minute) for the splash screen of the app to come up. No CPU activity meanwhile. What could that be?

Here's the version output:

java version "1.6.0"
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)

                                    

Comments
EVALUATION

Problem is we are making network connections every time the application calls URLConnection.getContentEncoding on http://www.jext.org/apps/lib/jext-5.0.jar.  This is probably a bug in Java Web Start.  In JNLPCachedJarURLConnection, we didn't override getHeaderField.  We should override getHeaderField and return the cached headers if possible.  This should speed things up.  See the current stack trace below:

"javawsApplicationMain" prio=6 tid=0x041cb400 nid=0xe54 runnable [0x0404f000..0x0404fc14]
   java.lang.Thread.State: RUNNABLE
    at java.net.SocketInputStream.socketRead0(Native Method)
    at java.net.SocketInputStream.read(Unknown Source)
    at java.io.BufferedInputStream.fill(Unknown Source)
    at java.io.BufferedInputStream.read1(Unknown Source)
    at java.io.BufferedInputStream.read(Unknown Source)
    - locked <0x229bc770> (a java.io.BufferedInputStream)
    at sun.net.www.http.HttpClient.parseHTTPHeader(Unknown Source)
    at sun.net.www.http.HttpClient.parseHTTP(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    - locked <0x22999a58> (a sun.net.www.protocol.http.HttpURLConnection)
    at sun.net.www.protocol.http.HttpURLConnection.getHeaderField(Unknown Source)
    at sun.net.www.protocol.jar.JarURLConnection.getHeaderField(Unknown Source)
    at java.net.URLConnection.getContentEncoding(Unknown Source)
    at com.microstar.xml.XmlParser.pushURL(Unknown Source)
    at com.microstar.xml.XmlParser.parseDoctypedecl(Unknown Source)
    at com.microstar.xml.XmlParser.parseProlog(Unknown Source)
    at com.microstar.xml.XmlParser.parseDocument(Unknown Source)
    at com.microstar.xml.XmlParser.doParse(Unknown Source)
    - locked <0x22a70000> (a com.microstar.xml.XmlParser)
    at com.microstar.xml.XmlParser.parse(Unknown Source)
    at org.jext.xml.XPropertiesReader.read(Unknown Source)
    at org.jext.xml.XPropertiesReader.read(Unknown Source)
    at org.jext.Jext.loadXMLProps(Unknown Source)
    at org.jext.Jext.initProperties(Unknown Source)
    at org.jext.Jext.main(Unknown Source)
    - locked <0x23182e28> (a java.util.ArrayList)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at com.sun.javaws.Launcher.executeApplication(Launcher.java:1224)
    at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1170)
    at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:1017)
    at com.sun.javaws.Launcher.run(Launcher.java:104)
    at java.lang.Thread.run(Unknown Source)
                                     
2007-02-17



Hardware and Software, Engineered to Work Together