Corrupted Jar file?

Discussion in 'Java' started by Andrew Thompson, Sep 17, 2006.

  1. 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.
    Andrew Thompson, Sep 17, 2006
    #1
    1. Advertising

  2. Andrew Thompson wrote:
    > 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.
    Andrew Thompson, Sep 18, 2006
    #2
    1. Advertising

  3. Andrew Thompson

    Chris Uppal Guest

    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
    Chris Uppal, Sep 19, 2006
    #3
  4. Chris Uppal wrote:
    > Andrew Thompson wrote:
    >
    > [lots of unecessary quoting snipped -- tut, tut, Andrew]


    It was ..just in case anybody had forgot (ducks).

    > > 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>

    ....
    > 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.
    Andrew Thompson, Sep 19, 2006
    #4
  5. Andrew Thompson

    Chris Uppal Guest

    Andrew Thompson wrote:

    > > 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
    Chris Uppal, Sep 20, 2006
    #5
  6. Chris Uppal wrote:
    > Andrew Thompson wrote:
    >
    > > > 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.
    ....
    > > * Unfortunately, the JMF installer has no equivalent
    > > /uninstaller/,

    ....
    > 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.
    Andrew Thompson, Sep 20, 2006
    #6
  7. Andrew Thompson wrote:
    > 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.
    Andrew Thompson, Sep 22, 2006
    #7
  8. Andrew Thompson wrote:
    > 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.
    Andrew Thompson, Sep 22, 2006
    #8
  9. Andrew Thompson

    Chris Uppal Guest

    Andrew Thompson wrote:

    > 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
    Chris Uppal, Sep 22, 2006
    #9
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. lucy
    Replies:
    6
    Views:
    30,614
    steve
    Sep 7, 2004
  2. Arnold Peters
    Replies:
    0
    Views:
    564
    Arnold Peters
    Jan 5, 2005
  3. muttley
    Replies:
    0
    Views:
    2,714
    muttley
    Oct 20, 2005
  4. cyberco
    Replies:
    4
    Views:
    3,745
    Roedy Green
    Feb 14, 2006
  5. Arnold Peters
    Replies:
    0
    Views:
    653
    Arnold Peters
    Jan 5, 2005
Loading...

Share This Page