JDK-4751780 : JWS Hanging on Jar update (Scanning entries at 100% for a LONG time)
  • Type: Bug
  • Component: deploy
  • Sub-Component: webstart
  • Affected Version: 1.0.1
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: windows_2000
  • CPU: x86
  • Submitted: 2002-09-23
  • Updated: 2002-11-19
  • Resolved: 2002-11-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
1.4.2 mantisFixed
Related Reports
Duplicate :  
Description

Name: nt126004			Date: 09/23/2002


FULL PRODUCT VERSION :
java version "1.4.0_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0_01-b03)
Java HotSpot(TM) Client VM (build 1.4.0_01-b03, mixed mode)

FULL OPERATING SYSTEM VERSION :

  Bug reproduced on Windows 2K, XP, 98

ADDITIONAL OPERATING SYSTEMS :
Reproduced on Linux 2.4.19 - Redhat 7.3 - Gnome Ximian

EXTRA RELEVANT SYSTEM CONFIGURATION :
Reproduced with the jar files on IIS and Apache, on Windows
and  Linux.

A DESCRIPTION OF THE PROBLEM :
This is exactly BUG ID 4504060
(http://developer.java.sun.com/developer/bugParade/bugs/4504060.html)
that was closed as not reproductible.

  To reproduce the problem, you need to have a couple linked
JNLP files for multiple jar files.

You also need to sign all the Jar files with a RSA Key. Mine
is a selfsigned one.

On updates of the main jar file, Java Web Start hang for
many minutes (or at some times more than 10 minutes) while
"Scanning entries (100% done). The CPU is 0% when it hangs.

If you cancel and restart your JWS app, everything is OK.

I Reproduced that problem using your own notepad JWS demo,
and if you contact me by email, I'll send you any files you
might need.

I've read reports (but always without anwsers) that this bug
existed in previous J2SE Version (1.3+), and I've read that
it *still* happen with Java Web Start 1.2 RC.

And as I already reported, this can be reproduced on any OS.

I Hope you can insert a fix for this bug before releasing
JWS 1.2 !

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1. Have multiple JAR and JNLP files (see source code)

notepad.jnlp is the main jnlp file.
  To reproduce the problem, you need more ;-)

I added the others jnlp and jar files like in my current
project. They are declared as resources extension in the main
jnlp file.

2. Sign (I self signed all jars with a self signed RSA
certificate I generated with your keytool.)

3. Install, run. At the first time, everything is correctly
 downloaded and it runs.

4. Change the date of the main jar file (notepad.jar here).

5. Browser -> http://martinm/notepad.jnlp

   JWS will hang like specified before.
   At the second load, all is ok

6. GOTO 4.

If I made an error, I will help you reproduce it, contact me.

EXPECTED VERSUS ACTUAL BEHAVIOR :
Things should not hang ;-)

ERROR MESSAGES/STACK TRACES THAT OCCUR :
Nothing in the java web start console.

REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="0.2 1.0"
      codebase="http://martinm/"
      href="notepad.jnlp">
   <information>
      <title>Notepad App</title>
      <vendor>Sun Microsystems, Inc.</vendor>
      <homepage href="index.html"/>
      <description>Notepad Demo Description</description>
      <description kind="short">Notepad Demo Short Description</description>
      <offline-allowed/>
   </information>
   <security>
   	  <all-permissions/>
   </security>
   <resources>
      <j2se version="1.3+" href="http://java.sun.com/products/autodl/j2se"/>
      <jar href="notepad.jar" main="true" download="eager"/>
	  <extension name="Pervasive SQL" href="pervasive.jnlp"/>
      <extension name="Microsoft SQL 2000 JDBC" href="mssql2k.jnlp"/>
      <extension name="IDS JDBC" href="ids.jnlp"/>
   </resources>
   <application-desc main-class="Notepad"/>
</jnlp>



<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://martinm/" href="ids.jnlp">
 	<information>
		<title>IDS JDBC</title>
		<vendor>IDS Software, Inc</vendor>
	</information>
	<security>
		<all-permissions/>
	</security>
	<resources>
		<jar href="jdk12drv.jar"/>
	</resources>
	<component-desc/>
</jnlp>



<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://martinm/" href="mssql2k.jnlp">
 	<information>
		<title>Microsoft SQL 2000 JDBC</title>
		<vendor>Microsoft, Inc.</vendor>
		<offline-allowed/>
	</information>
	<security>
		<all-permissions/>
	</security>
	<resources>
		<jar href="msbase.jar"/>
		<jar href="msutil.jar"/>
		<jar href="mssqlserver.jar"/>
	</resources>
	<component-desc/>
</jnlp>



<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://martinm/" href="pervasive.jnlp">
 	<information>
		<title>Pervasive SQL</title>
		<vendor>Pervasive Software</vendor>
	</information>
	<security>
		<all-permissions/>
	</security>
	<resources>
		<jar href="pervasiveJDBC.jar"/>
	</resources>
	<component-desc/>
</jnlp>

---------- END SOURCE ----------

CUSTOMER WORKAROUND :
1. Maybe if I use only one JNLP it will work, I'll try it.

2. Cancel while it stays at Scanning 100% Done, and restart
JWS App.
(Review ID: 164107) 
======================================================================

Comments
CONVERTED DATA BugTraq+ Release Management Values COMMIT TO FIX: mantis FIXED IN: mantis INTEGRATED IN: mantis
31-08-2004

SUGGESTED FIX http://javaweb.sfbay/~ngthomas/webrevs/4751780/webrev
31-08-2004

EVALUATION cannot reproduce problem with Java Web Start 1.2 I will email customer and ask them to try with JWS 1.2 ###@###.### 2002-10-31 with the help of more customer information, I can finally reproduce the problem on WinNT + apache 2.0.43 + no proxy server (for some reason if we use proxy the problem cannot be reproduced) The problem is actually caused by we never disconnect the HttpURLConnection that we opened to get resources. I tried with a simple standalone java program, which makes 10 request to the apache server. each request simply open the connection and get the response code. This will hang the same way as we did in java web start. However if I put in HttpURLConnection.disconect after each connection, everything works. I did the same thing in the webstart code, and the hanging goes away too. ###@###.### 2002-11-11
11-11-2002