United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6964501 unsigned entry in ressource hibernate3.jar
JDK-6964501 : unsigned entry in ressource hibernate3.jar

Details
Type:
Bug
Submit Date:
2010-06-26
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
deploy
OS:
windows_7
Sub-Component:
webstart
CPU:
x86
Priority:
P2
Resolution:
Fixed
Affected Versions:
6u20
Fixed Versions:

Related Reports
Relates:

Sub Tasks

Description
FULL PRODUCT VERSION :
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)

javac 1.6.0_20

ADDITIONAL OS VERSION INFORMATION :
Microsoft Windows [Version 6.1.7600]

A DESCRIPTION OF THE PROBLEM :
javaws throws JARSigningException on the signed file hibernate3.jar (3.5.2)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
1: hibernate-3.5.2.jnlp:

<?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+"
        version="0.1"
        codebase="http://your.site.org/"
        href="http://your.site.org/hibernate-3.5.2.jnlp">
  <information>
    <title>UklanAdmin-Test V2.1</title>
    <vendor>RRZK</vendor>
    <homepage href="http://www...."/>
    <description>...</description>
    <description kind="tooltip">...</description>
    <description kind="short">...</description>
    <icon href="http://....gif"/>
    <shortcut online="true">
                <menu />
        </shortcut>
  </information>

  <security>
        <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>

    <jar href="libtest/hibernate3.jar"  />
    <jar href="libtest/hibernate-testing.jar"  />

  </resources>

  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase" />
</jnlp>

2: sign and deploy the two jar-files
3: veryfi signature:

jarsigner -verify hibernate3.jar
jar verified.

4. Start Javawebstart:
javaws http://.../hibernate-3.5.2.jnlp




EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Application should start.
ACTUAL -
#### Java Web Start Error:
#### Unsignierter Eintrag in Ressource: http://uklaninfo.rrz.uni-koeln.de/libtest/hibernate3.jar gefunden


ERROR MESSAGES/STACK TRACES THAT OCCUR :
Console:


Java Web Start 1.6.0_20
Verwendung der JRE-Version 1.6.0_20-b02 Java HotSpot(TM) Client VM
Home-Verzeichnis des Benutzers = C:\Users\mloenhar
----------------------------------------------------
c:   Konsole l??schen
f:   Objekte in Finalisierungswarteschlange finalisieren
g:   Speicherbereinigung
h:   Diese Hilfemeldung anzeigen
m:   Speicherbelegung anzeigen
o:   Protokollierung ausl??sen
p:   Proxy-Konfiguration neu laden
q:   Konsole ausblenden
r:   Richtlinien-Konfiguration neu laden
s:   System- und Bereitstellungseigenschaften ausgeben
t:   Threadliste ausgeben
v:   Thread-Stack ausgeben
0-5: Trace-Stufe auf <n> setzen
----------------------------------------------------
temp: new XMLParser with source:
temp: <?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+"
	version="0.1"
	codebase="http://uklaninfo.rrz.uni-koeln.de/"
	href="http://uklaninfo.rrz.uni-koeln.de/hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="http://...."/>
    <description>Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
  </information>

  <security>
	<all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>

    <jar href="libtest/hibernate3.jar"  />
    <jar href="libtest/hibernate-testing.jar"  />
    
  </resources>

  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase" />
</jnlp>

temp:

returning ROOT as follows:

<jnlp spec="1.0+" version="0.1" codebase="http://..." href="http://.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="..."/>
    <description>Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>
    <jar href="libtest/hibernate3.jar"/>
    <jar href="libtest/hibernate-testing.jar"/>
  </resources>
  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase"/>
</jnlp>jnlp
temp: returning LaunchDesc from XMLFormat.parse():

<jnlp spec="1.0+" codebase="..." version="0.1" href="http:.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="http:..."/>
    <description>Test</description>
    <description kind="short">Test</description>
    <description kind="tooltip">Test</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java java-vm-args="-Xss8M -Xms96M -Xmx512M" version="1.6+"/>
    <jar href="http:.../libtest/hibernate3.jar" download="eager" main="false"/>
    <jar href="http:.../libtest/hibernate-testing.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase"/>
</jnlp>
temp: new XMLParser with source:
temp: <?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+"
	version="0.1"
	codebase="http:.../"
	href="http:.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="http:..."/>
    <description>Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
  </information>

  <security>
	<all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>

    <jar href="libtest/hibernate3.jar"  />
    <jar href="libtest/hibernate-testing.jar"  />
    
  </resources>

  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase" />
</jnlp>

temp:

returning ROOT as follows:

<jnlp spec="1.0+" version="0.1" codebase="http:..." href=".../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="..."/>
    <description>Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>
    <jar href="libtest/hibernate3.jar"/>
    <jar href="libtest/hibernate-testing.jar"/>
  </resources>
  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase"/>
</jnlp>jnlp
temp: returning LaunchDesc from XMLFormat.parse():

<jnlp spec="1.0+" codebase="http:..." version="0.1" href="http:.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="http:..."/>
    <description>Test</description>
    <description kind="short">Test</description>
    <description kind="tooltip">Test</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java java-vm-args="-Xss8M -Xms96M -Xmx512M" version="1.6+"/>
    <jar href="http:.../libtest/hibernate3.jar" download="eager" main="false"/>
    <jar href="http:.../libtest/hibernate-testing.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase"/>
</jnlp>
Could not launch from cache. Will try online mode. [Some of required resources are not cached.]
temp: new XMLParser with source:
temp: <?xml version="1.0" encoding="UTF-8"?>

<jnlp spec="1.0+"
	version="0.1"
	codebase="http:..."
	href="http://.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="http:..."/>
    <description>Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
  </information>

  <security>
	<all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>

    <jar href="libtest/hibernate3.jar"  />
    <jar href="libtest/hibernate-testing.jar"  />
    
  </resources>

  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase" />
</jnlp>

temp:

returning ROOT as follows:

<jnlp spec="1.0+" version="0.1" codebase="..." href="http:.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="..."/>
    <description>Test</description>
    <description kind="tooltip">Test</description>
    <description kind="short">Test</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se version="1.6+" java-vm-args="-Xss8M -Xms96M -Xmx512M"/>
    <jar href="libtest/hibernate3.jar"/>
    <jar href="libtest/hibernate-testing.jar"/>
  </resources>
  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase"/>
</jnlp>jnlp
temp: returning LaunchDesc from XMLFormat.parse():

<jnlp spec="1.0+" codebase="http:..." version="0.1" href="http:.../hibernate-3.5.2.jnlp">
  <information>
    <title>Test</title>
    <vendor>Test</vendor>
    <homepage href="http:..."/>
    <description>Test</description>
    <description kind="short">Test</description>
    <description kind="tooltip">Test</description>
  </information>
  <security>
    <all-permissions/>
  </security>
  <update check="timeout" policy="always"/>
  <resources>
    <java java-vm-args="-Xss8M -Xms96M -Xmx512M" version="1.6+"/>
    <jar href="http:.../libtest/hibernate3.jar" download="eager" main="false"/>
    <jar href=".../libtest/hibernate-testing.jar" download="eager" main="false"/>
  </resources>
  <application-desc main-class="org.hibernate.test.annotations.HibernateTestCase"/>
</jnlp>
#### Java Web Start Error:
#### Unsignierter Eintrag in Ressource: http://uklaninfo.rrz.uni-koeln.de/libtest/hibernate3.jar gefunden


REPRODUCIBILITY :
This bug can be reproduced always.

                                    

Comments
EVALUATION

??The reason of the missing signer for absolute path was the "path-compressing" mechanism of CacheEntry where next entry that have same path as previous entry is recorded only as a filename with beginning "/" as following example:

org/hibernate/mapping/PrimitiveArray.class

2 0 1

/MetaAttribute.class

2 0 1

On uncompressing, the absolute path was mistaken as a name with compressed-path, so the name get incorrectly expanded.

The back-ward compatible fix is to escape the absolute path with a character like ":" as following:

:??/hibernate-distribution-3.5.2-Final.pom

2 0 1
                                     
2010-11-23
SUGGESTED FIX

The cause is that the hibernate jar has an entry with absolute path, which get mistaken by CacheEntry on read from cache as a compressed-package-named entry.  

To fix with backward compatibility, on writing manifest info to cache we need to escape absolute paths with special character that is not allowed to be part of filename: '\\t'.  On reading from cache, we need to exclude this escape character from the entry names.

Add unit test to directly verify the writing and reading of signing info.
                                     
2010-11-30



Hardware and Software, Engineered to Work Together