Java Solaris Communities Sun Store Join SDN My Profile Why Join?
 
Bug Database
Bug Detail
Quick Lists
Top 25 Bugs
Top 25 RFE's
Recently Closed Bugs
Printable Page Printable Page


Bug Database
Bug ID: 5057141
Votes 0
Synopsis Java Web Start fails to download lots of applications: "unable to launch XXX"
Category javawebstart:download_engine
Reported Against tiger-beta2
Release Fixed
State 11-Closed, duplicate of 5039967, bug
Priority: 3-Medium
Related Bugs 5039967
Submit Date 03-JUN-2004
Description




FULL PRODUCT VERSION :
java version "1.5.0-beta2"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-beta2-b51)
Java HotSpot(TM) Client VM (build 1.5.0-beta2-b51, mixed mode, sharing)

ADDITIONAL OS VERSION INFORMATION :
 customer  Windows XP [Version 5.1.2600]
Linux Suse 9.0

A DESCRIPTION OF THE PROBLEM :
A great number of JNLP app's fails to start on Windows and Linux, different machines and internet links. Download starts, and then terminates with message "unable to launch XXX"

-
It doesn't stop always at the same place, sometimes it dowloads a lot, sometimes almost nothing, and there are some apps that do work (eg Wurm online)

Lots of JGoodies samples dont work, and UVC client also. Similar exception hits some applets too.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Hit some jnlp links on jgoodies or UVC. They will start downloading, and die in the middle of it.,

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
It should just work

ERROR MESSAGES/STACK TRACES THAT OCCUR :
JNLPException[category: Download Error : Exception: java.io.IOException: Stream closed. : LaunchDesc: null ]
	at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)
	at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
	at com.sun.javaws.cache.DownloadProtocol.getResource(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(Unknown Source)

or wrapped exception:
java.io.IOException: Stream closed.
	at java.net.PlainSocketImpl.available(Unknown Source)
	at java.net.SocketInputStream.available(Unknown Source)
	at java.io.BufferedInputStream.available(Unknown Source)
	at sun.net.www.MeteredStream.available(Unknown Source)
	at sun.net.www.http.KeepAliveStream.close(Unknown Source)
	at java.io.FilterInputStream.close(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.close(Unknown Source)
	at java.io.BufferedInputStream.close(Unknown Source)
	at java.io.BufferedInputStream.close(Unknown Source)
	at com.sun.javaws.net.BasicDownloadLayer.download(Unknown Source)
	at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(Unknown Source)
	at com.sun.javaws.cache.DownloadProtocol.doDownload(Unknown Source)
	at com.sun.javaws.cache.DownloadProtocol.getResource(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(Unknown Source)



REPRODUCIBILITY :
This bug can be reproduced often.
(Incident Review ID: 275722) 
======================================================================
Work Around
N/A
Evaluation
The real cause of the problem is we get a SocketException during the download of jar:

java.net.SocketException: socket closed
   at java.net.SocketInputStream.socketRead0(Native Method)
   at java.net.SocketInputStream.read(Unknown Source)
   at java.io.BufferedInputStream.read1(Unknown Source)
   at java.io.BufferedInputStream.read(Unknown Source)
   at sun.net.www.MeteredStream.read(Unknown Source)
   at java.io.FilterInputStream.read(Unknown Source)
   at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unknown Source)
   at java.io.BufferedInputStream.read1(Unknown Source)
   at java.io.BufferedInputStream.read(Unknown Source)
   at java.io.BufferedInputStream.read1(Unknown Source)
   at java.io.BufferedInputStream.read(Unknown Source)
   at java.io.FilterInputStream.read(Unknown Source)
   at com.sun.javaws.net.BasicDownloadLayer.download(BasicDownloadLayer.java:68)   at com.sun.javaws.cache.DownloadProtocol$RetrieveAction.actionDownload(DownloadProtocol.java:417)
   at com.sun.javaws.cache.DownloadProtocol.doDownload(DownloadProtocol.java:602)
   at com.sun.javaws.cache.DownloadProtocol.getResource(DownloadProtocol.java:755)
   at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:729)
   at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:652)
   at com.sun.javaws.Launcher.downloadResources(Launcher.java:967)
   at com.sun.javaws.Launcher.handleApplicationDesc(Launcher.java:335)
   at com.sun.javaws.Launcher.handleLaunchFile(Launcher.java:218)
   at com.sun.javaws.Launcher.run(Launcher.java:165)
   at java.lang.Thread.run(Unknown Source) 

Java Web Start code then catch the exception, call close on the input stream, which then cause the stack trace in the bug description.

We should investigate into the root cause of this problem (SocketExcpetion thrown during jar download) first.  The close problem is less critical.




  xxxxx@xxxxx   2004-06-07


I can reproduce the problem outside of javawebstart.  Attached is the test case in this bug.

To reproduce the problem, run with tiger beta2:

java test http://capoon.sfbay.sun.com:8080/client/client.jar

And you will see exception:

java.net.SocketException: socket closed
       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)
       at sun.net.www.MeteredStream.read(Unknown Source)
       at java.io.FilterInputStream.read(Unknown Source)
       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unkn
own Source)
       at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(Unkn
own Source)
       at test.main(test.java:38)

The test basically does HEAD and GET request to the url specified for a few times, which is basically what java web start does to download jar files.

If I run the test with 1.4.2, it will never throw such expcetion and always succeed.

I can reproduce the bug on my windows2000 and winXP machine.

The sever is tomcat 4.1.27 running on solaris.  I tried 4.1.30 running on the windows, same behaviour. 



  xxxxx@xxxxx   2004-06-07

the networking part of the fix for 5039967 fixes this problem


  xxxxx@xxxxx   2004-06-09
Comments
  
  Include a link with my name & email   

Submitted On 20-JUN-2004
compagner
this is still not fixed in build 56. Didn't the fix go in this build?


Submitted On 15-JUL-2004
josecefe
This is still not fixed in build 57...


Submitted On 16-JUL-2004
funchung
it will be fixed in b58, refer to this bug for more detail:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=5067294


Submitted On 22-DEC-2007
wairisk@one.lv


Submitted On 06-JAN-2008
jcore3000
me too, jdk1.6, tomcat 6.0

java.io.IOException: Stream closed
	at java.io.BufferedInputStream.getBufIfOpen(BufferedInputStream.java:145)
	at java.io.BufferedInputStream.read(BufferedInputStream.java:308)
	at java.io.FilterInputStream.read(FilterInputStream.java:116)
	at sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2364)
	at sun.nio.cs.StreamDecoder.readBytes(StreamDecoder.java:264)
	at sun.nio.cs.StreamDecoder.implRead(StreamDecoder.java:306)
	at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:158)
	at java.io.InputStreamReader.read(InputStreamReader.java:167)
	at java.io.BufferedReader.fill(BufferedReader.java:136)
	at java.io.BufferedReader.readLine(BufferedReader.java:299)
	at java.io.BufferedReader.readLine(BufferedReader.java:362)
	at com.plugins.crawl.HttpCrawl.getDoc(HttpCrawl.java:50)
	at com.crawl.common.Document.init(Document.java:98)
	at com.crawl.common.Document.<init>(Document.java:79)
	at com.crawl.common.CrawlLink.run(CrawlLink.java:27)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
	at java.lang.Thread.run(Thread.java:619)



PLEASE NOTE: JDK6 is formerly known as Project Mustang