Corrupted Jar file?

A

Andrew Thompson

I am trying to deploy some JMF DLL's via webstart,
and it is not going well. I keep getting the message
in the JWS console..
"Corrupted JAR file at
http://www.javasaver.com/testjs/jmf/lib/win-natives.jar"

I have verifed the Jar locally, and it shows no problems.

Viz.
<Output>
D:\projects\jmf\player>jarsigner -verify -verbose -certs
lib/win-natives.jar

1395 Sat Sep 16 20:53:48 GMT 2006 META-INF/MANIFEST.MF
1516 Sat Sep 16 20:53:48 GMT 2006 META-INF/MEDIAPLA.SF
1025 Sat Sep 16 20:53:48 GMT 2006 META-INF/MEDIAPLA.DSA
0 Sat Sep 16 20:53:10 GMT 2006 META-INF/
sm 49152 Mon Apr 28 00:30:56 GMT 2003 jmacm.dll

X.509, CN=Andrew Thompson, O=PhySci.org, L=Sydney, ST=New South
Wales, C=AU
[certificate valid from Wed Sep 13 15:24:29 GMT 2006 to Mon Mar
05 15:24:2
......

X.509, CN=Andrew Thompson, O=PhySci.org, L=Sydney, ST=New South
Wales, C=AU
[certificate valid from Wed Sep 13 15:24:29 GMT 2006 to Mon Mar
05 15:24:29 GMT 2012]


s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope

jar verified.
</Output>

Other notes:
a) The DLL is referenced in a JNLP that defines the
'component/library' part of the JMF (DLL's and the soundbank)
<http://www.javasaver.com/testjs/jmf/lib/jmf-pp-lib.jnlp>
(at the moment - the soundbank is commented out to
ensure that this is not a problem complicated by jar's
signed with different signatures etc.)
b) That 'library' JNLP is in turn, called by the main file at
<http://www.javasaver.com/testjs/jmf/jmstudio-pp.jnlp>
which attempts to launch JM Studio.

Any ideas what I am doing wrong?

Andrew T.
 
A

Andrew Thompson

Andrew said:
I am trying to deploy some JMF DLL's via webstart,
and it is not going well. I keep getting the message
in the JWS console..
"Corrupted JAR file at
http://www.javasaver.com/testjs/jmf/lib/win-natives.jar"

I have verifed the Jar locally, and it shows no problems.

Viz.
<Output>
D:\projects\jmf\player>jarsigner -verify -verbose -certs
lib/win-natives.jar

1395 Sat Sep 16 20:53:48 GMT 2006 META-INF/MANIFEST.MF
1516 Sat Sep 16 20:53:48 GMT 2006 META-INF/MEDIAPLA.SF
1025 Sat Sep 16 20:53:48 GMT 2006 META-INF/MEDIAPLA.DSA
0 Sat Sep 16 20:53:10 GMT 2006 META-INF/
sm 49152 Mon Apr 28 00:30:56 GMT 2003 jmacm.dll

X.509, CN=Andrew Thompson, O=PhySci.org, L=Sydney, ST=New South
Wales, C=AU
[certificate valid from Wed Sep 13 15:24:29 GMT 2006 to Mon Mar
05 15:24:2
.....

X.509, CN=Andrew Thompson, O=PhySci.org, L=Sydney, ST=New South
Wales, C=AU
[certificate valid from Wed Sep 13 15:24:29 GMT 2006 to Mon Mar
05 15:24:29 GMT 2012]


s = signature was verified
m = entry is listed in manifest
k = at least one certificate was found in keystore
i = at least one certificate was found in identity scope

jar verified.
</Output>

Other notes:
a) The DLL is referenced in a JNLP that defines the
'component/library' part of the JMF (DLL's and the soundbank)
<http://www.javasaver.com/testjs/jmf/lib/jmf-pp-lib.jnlp>
(at the moment - the soundbank is commented out to
ensure that this is not a problem complicated by jar's
signed with different signatures etc.)
b) That 'library' JNLP is in turn, called by the main file at
<http://www.javasaver.com/testjs/jmf/jmstudio-pp.jnlp>
which attempts to launch JM Studio.

Any ideas what I am doing wrong?

I put up a second test against the much smaller Windows
JOGL natives jar (61 Kb).
<http://www.javasaver.com/testjs/jmf/jmstudio-jogl.jnlp>
It loads without problems, though mentioning the
certificate is invalid (expired/not yet valid).

(Of course, the JOGL natives have no bearing on the JMF,
I just wanted to see if it reported the same problem - it does not).

Andrew T.
 
C

Chris Uppal

Andrew Thompson wrote:

[lots of unecessary quoting snipped -- tut, tut, Andrew]
I put up a second test against the much smaller Windows
JOGL natives jar (61 Kb).
<http://www.javasaver.com/testjs/jmf/jmstudio-jogl.jnlp>
It loads without problems, though mentioning the
certificate is invalid (expired/not yet valid).

I wonder if the problem might be that your orginal jar contained no .class
files at all. I see no reason why that /should/ cause a problem but I find it
easy to imagine Sun's programmers creating code where it /does/ cause a problem
;-)

-- chris
 
A

Andrew Thompson

Chris said:
Andrew Thompson wrote:

[lots of unecessary quoting snipped -- tut, tut, Andrew]

It was ..just in case anybody had forgot (ducks).
....
I wonder if the problem might be that your orginal jar contained no .class
files at all.

I don't think so.

It is currently used as part of the JOGL web-start.

The java classes are in a common jar, then each platform
has it's DLL's/.so's in a platform specific jar.

So the JOGL (win-natives) jar contains just
- two DLL's,
- the Manifest.mf, and the
- .rsa/.sf signature files .

The only real differences I could see between the JOGL
jar and the one I created for the JMF is that mine is signed
with an unverified certificate (hence the digital singature files
are .dsa/.sf) and that it contains 21 DLL's.
...I see no reason why that /should/ cause a problem but I find it
easy to imagine Sun's programmers creating code where it /does/ cause a problem

I know what you mean, but the fact that the JOGL
jar works OK - suggests it is not the problem.

Another theory I have been working on (that makes
little sense to me) is that maybe the installation* of the
JMF on my local system is somehow confusing Java?

If it expects the DLL to be in a signed Jar, but instead
finds it in 'WINDOWS/system32' on the file system, it
might be helpfully telling me that 'system32' is not a
valid Jar file.

This theory breaks down at the point of explaining why
Java would not then identify 'system32' as being the
corrupt Jar file..

Also - I cannot imagine that such a grievous error could
go undetected for long.

* Unfortunately, the JMF installer has no equivalent
/uninstaller/, so I am not very confident that I can remove
all traces of installed JMF from this PC - in order to
further test that theory.

Andrew T.
 
C

Chris Uppal

Andrew said:
I wonder if the problem might be that your orginal jar contained no
.class files at all.
[...]
The only real differences I could see between the JOGL
jar and the one I created for the JMF is that mine is signed
with an unverified certificate (hence the digital singature files
are .dsa/.sf) and that it contains 21 DLL's.

Ah, I tried to compare the JARs myself but must have picked the wrong one for
JOGL. Apologies for the misdirection.

The only thing I can suggest is that you try to isolate the problem in the
traditional way. Remove files from the JAR until it starts to work. Add files
to the JOGL jar until it stops working. Try signing the JOGL jar in the same
way as you do the JVM one. And so on -- just the usual stuff....

If it expects the DLL to be in a signed Jar, but instead
finds it in 'WINDOWS/system32' on the file system, it
might be helpfully telling me that 'system32' is not a
valid Jar file.

That should be easy enough to confirm. Just rename the DLLs in the JMF JAR,
re-sign, and see if that problem goes away.

* Unfortunately, the JMF installer has no equivalent
/uninstaller/, so I am not very confident that I can remove
all traces of installed JMF from this PC - in order to
further test that theory.

VMWare is a /very/ useful tool for when you need to work with standard or
"clean" installations to test stuff.

-- chris
 
A

Andrew Thompson

Chris said:
Andrew said:
I wonder if the problem might be that your orginal jar contained no
.class files at all.
[...]
The only real differences I could see between the JOGL
jar and the one I created for the JMF is that mine is signed
with an unverified certificate
....
Ah, I tried to compare the JARs myself but must have picked the wrong one for
JOGL. Apologies for the misdirection.

I want a refund. ;-)
The only thing I can suggest is that you try to isolate the problem in the
traditional way. Remove files from the JAR until it starts to work. Add files
to the JOGL jar until it stops working. Try signing the JOGL jar in the same
way as you do the JVM one. And so on -- just the usual stuff....

Good idea. I'll give that a go.
....
....
VMWare is a /very/ useful tool for when you need to work with standard or
"clean" installations to test stuff.

Thanks, I might look into that.

Andrew T.
 
A

Andrew Thompson

Andrew said:
I am trying to deploy some JMF DLL's via webstart,
and it is not going well. I keep getting the message
in the JWS console..
"Corrupted JAR file at
http://www.javasaver.com/testjs/jmf/lib/win-natives.jar"

I had a hunch that this was related to the fact that
the JMF was installed locally on this PC.

A successful launch at the library (on a PC that never
had JMF installed) seems to support that theory.
b) That 'library' JNLP is in turn, called by the main file at
<http://www.javasaver.com/testjs/jmf/jmstudio-pp.jnlp>

Would it be possible to get some more test results?
( From both JMF'd and non JMF'd PC's. )

It can be launched from the above URL, but for further
description, see ..
<http://www.javasaver.com/testjs/jmf/#test3>

Please note - the jar file most in question is *only* served up
to Win. based PC's, but I used the same technique to jar
and sign the *nix based 'shared object' natives. There are
no natives delivered to Mac's, since there is no Performance
Pack available for them. :-(

Andrew T.
 
A

Andrew Thompson

Andrew said:
I am trying to deploy some JMF DLL's via webstart,
and it is not going well. I keep getting the message
in the JWS console..
"Corrupted JAR file at
http://www.javasaver.com/testjs/jmf/lib/win-natives.jar"

I have verifed the Jar locally, and it shows no problems.

But when I attempted to open the WebStart control panel
with the command..
javaws
...the real problem became clear.
"javaws cache is corrupted"
It was not the Jar that was corrupted at all, but the
WebStart *cache*.

Further, calls to ..
javaws -uninstall
...and..
javaws -Xclearcache
...(either of which should have cleared the cache)
caused the same message!

The fix was to use the Java control panel go to the
Settings of 'Temporary Internet Files' and create a new
cache by 'Change'ing the Location.

( Damn those inaccurate error messages.. )

Andrew T.
 
C

Chris Uppal

Andrew said:
But when I attempted to open the WebStart control panel
with the command..
javaws
..the real problem became clear.
"javaws cache is corrupted"
It was not the Jar that was corrupted at all, but the
WebStart *cache*.

Ouch !

-- chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top