JDK-5056524 : Invalid HTTP request during download of jars
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-06-02
  • Updated: 2004-06-09
  • Resolved: 2004-06-09
Related Reports
Duplicate :  
Description

Name: gm110360			Date: 06/02/2004


FULL PRODUCT VERSION :
build 1.5.0-beta2-b51

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows XP [Version 5.1.2600]

EXTRA RELEVANT SYSTEM CONFIGURATION :
Accessing a WebLogic 8.1 SP2 server running on Windows Server 2003

A DESCRIPTION OF THE PROBLEM :
When using 1.5 Beta 2 to launch an existing webstart application deployed on WebLogic 8.1 SP2, I'm getting exceptions as shown in the error messages.

Web Start gives a closed stream exception because WebLogic is complaining it didn't recieve the correct stated content length and is likely dropping the connection.

This happens regularly, but is somewhat random.  I have observed if I clear the cache and restart the computer it will successfully download the application jars and run the app.  However clearing the cache and launching it again generates the problem.  It also randomley stops at different points in the download process.

This application successfully launches under 1.4.2 and a login dialog appears.

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Using 1.5 Beta 2, go to http://app.barchan.net and run the Web Start application there.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The application would download, confirm that it is signed correctly with the user, and then launch producing a login dialog.
ACTUAL -
Web Start produces an unable to launch error with the exception listed in the error messages.

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Client (From Web Start):

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)

Server (From WebLogic):

####<May 28, 2004 3:47:16 PM EDT> <Error> <HTTP> <BARCHAN_APP1> <barchan_server> <ExecuteThread: '23' for queue: 'weblogic.kernel.Default'> <<WLS Kernel>> <> <BEA-101104> <Servlet execution in servlet context "ServletContext(id=886461,name=/,context-path=)" failed, java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '12216' bytes instead of stated: '1100596' bytes..
java.net.ProtocolException: Didn't meet stated Content-Length, wrote: '12216' bytes instead of stated: '1100596' bytes.
	at weblogic.servlet.internal.ServletOutputStreamImpl.ensureContentLength(ServletOutputStreamImpl.java:470)
	at weblogic.servlet.internal.ServletResponseImpl.ensureContentLength(ServletResponseImpl.java:1176)
	at weblogic.servlet.internal.ServletResponseImpl.send(ServletResponseImpl.java:1188)
	at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2590)
	at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
	at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)


REPRODUCIBILITY :
This bug can be reproduced often.

---------- BEGIN SOURCE ----------
See steps to reproduce.
---------- END SOURCE ----------
(Incident Review ID: 275499) 
======================================================================

Comments
EVALUATION This seems like a problem in the server side. The root cause is due to a exception thrown in the weblogic server, which stopped the connection. Seems like others run into similar issue as well: http://groups.google.com/groups?q=weblogic+ensureContentLength&ie=UTF-8&hl=en&btnG=Google+Search I will contact the original bug submitter and ask them to try with another web server / servlet container. It might be a bug in weblogic. ###@###.### 2004-06-02 the networking part of the fix for bug 5039967 fixes this problem. ###@###.### 2004-06-09
02-06-2004