Corrupt JAR file?

Discussion in 'Java' started by Mike, Jan 2, 2007.

  1. Mike

    Mike Guest

    Hi,

    I am trying deploy a JAR file to WebSphere Application Server and am
    getting corrupt or incomplete error message. The JAR file contents is :

    0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
    71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
    1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
    93 Tue Jan 02 13:45:54 GMT 2007
    HelloServletsTextMessages_fr_FR.properties
    83 Tue Jan 02 13:46:32 GMT 2007
    HelloServletsTextMessages_en_US.properties


    Sun's JAR file tutorial makes no mention of the first entry
    "META-INF/". Does this JAR file look OK to you? Is there anything else
    I can do to verify the jar file?

    Does anyone know any good resources on the internet that might be
    useful?

    Thanks in advance,

    Mike
    Mike, Jan 2, 2007
    #1
    1. Advertising

  2. Mike

    Daniel Pitts Guest

    Mike wrote:
    > Hi,
    >
    > I am trying deploy a JAR file to WebSphere Application Server and am
    > getting corrupt or incomplete error message. The JAR file contents is :
    >
    > 0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
    > 71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
    > 1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
    > 93 Tue Jan 02 13:45:54 GMT 2007
    > HelloServletsTextMessages_fr_FR.properties
    > 83 Tue Jan 02 13:46:32 GMT 2007
    > HelloServletsTextMessages_en_US.properties
    >
    >
    > Sun's JAR file tutorial makes no mention of the first entry
    > "META-INF/". Does this JAR file look OK to you? Is there anything else
    > I can do to verify the jar file?
    >
    > Does anyone know any good resources on the internet that might be
    > useful?
    >
    > Thanks in advance,
    >
    > Mike


    Assuming you have added only HelloServlet1.class and
    HelloServletsTextMessages*.properties to your JAR, it looks fine. One
    of the main distinctions between a JAR file and a ZIP file (they are
    the same format after all), is that a JAR contains a
    META-INF/MANIFEST.MF file.

    Hope this helps.
    Daniel.
    Daniel Pitts, Jan 2, 2007
    #2
    1. Advertising

  3. Mike

    Lew Guest

    Mike wrote:
    >> I am trying deploy a JAR file to WebSphere Application Server and am
    >> getting corrupt or incomplete error message. The JAR file contents is :
    >>
    >> 0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
    >> 71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
    >> 1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
    >> 93 Tue Jan 02 13:45:54 GMT 2007
    >> HelloServletsTextMessages_fr_FR.properties
    >> 83 Tue Jan 02 13:46:32 GMT 2007
    >> HelloServletsTextMessages_en_US.properties


    Daniel Pitts wrote:
    > Assuming you have added only HelloServlet1.class and
    > HelloServletsTextMessages*.properties to your JAR, it looks fine. One
    > of the main distinctions between a JAR file and a ZIP file (they are
    > the same format after all), is that a JAR contains a
    > META-INF/MANIFEST.MF file.


    Normally servlets are packed in WAR files, not JAR files.

    - Lew
    Lew, Jan 2, 2007
    #3
  4. Daniel Pitts wrote:
    .....
    > > Sun's JAR file tutorial makes no mention of the first entry
    > > "META-INF/".

    ....
    > ....One
    > of the main distinctions between a JAR file and a ZIP file (they are
    > the same format after all), is that a JAR contains a
    > META-INF/MANIFEST.MF file.


    This one does. Many do. But is it not necessary in
    *all* situations.

    If a jar has a main*, but is launched by web-start, the
    main can be identified in the JNLP. If a jar contains
    an applet, the applet can be identified in the HTML.
    Given one Jar might contain one applet, and two
    applications, this is quite handy.

    Further, if this Jar is a 'library' it might also not need
    a manifest.

    * Sure, the manifest file can provide information
    beyond 'main class', but that seems to be what
    they are most commonly used to identify.

    (+ see what Lew was saying, re. JAR/WAR)

    Andrew T.
    Andrew Thompson, Jan 3, 2007
    #4
  5. Mike wrote:

    ...an email to me. Mike - please not the 'quote'
    <http://groups.google.com/groups/profile?enc_user=7mTjyhYAAADCSWBnolz9mAH1YeBMyEJTo4cocwWvDVg2RHsu8f1bCg>

    I am not here to establish pen-pals, though if
    you'd like to continue this via emial, I'll be happy
    to do consultancy via email, for $50 per reply.

    Andrew T.
    Andrew Thompson, Jan 3, 2007
    #5
  6. Mike

    Mike Guest

    Sorry on two counts. Didn't read your profile and meant to post to
    comp.lang.java.programmer
    Andrew Thompson wrote:
    > Mike wrote:
    >
    > ..an email to me. Mike - please not the 'quote'
    > <http://groups.google.com/groups/profile?enc_user=7mTjyhYAAADCSWBnolz9mAH1YeBMyEJTo4cocwWvDVg2RHsu8f1bCg>
    >
    > I am not here to establish pen-pals, though if
    > you'd like to continue this via emial, I'll be happy
    > to do consultancy via email, for $50 per reply.
    >
    > Andrew T.
    Mike, Jan 3, 2007
    #6
  7. Mike

    Mike Guest

    My main concern about the JAR file was the first line shown below which
    had its first entry as zero, which I am guessing is file size. However,
    since three people read this mesaage and did not comment on it I assume
    this is normal.

    0 Tue Jan 02 16:15:12 GMT 2007 META-INF/
    71 Tue Jan 02 16:15:12 GMT 2007 META-INF/MANIFEST.MF
    1986 Tue Jan 02 13:42:36 GMT 2007 HelloServlet1.class
    93 Tue Jan 02 13:45:54 GMT 2007
    HelloServletsTextMessages_fr_FR.properties
    83 Tue Jan 02 13:46:32 GMT 2007
    HelloServletsTextMessages_en_US.properties




    Andrew Thompson wrote:

    > Daniel Pitts wrote:
    > ....
    > > > Sun's JAR file tutorial makes no mention of the first entry
    > > > "META-INF/".

    > ...
    > > ....One
    > > of the main distinctions between a JAR file and a ZIP file (they are
    > > the same format after all), is that a JAR contains a
    > > META-INF/MANIFEST.MF file.

    >
    > This one does. Many do. But is it not necessary in
    > *all* situations.
    >
    > If a jar has a main*, but is launched by web-start, the
    > main can be identified in the JNLP. If a jar contains
    > an applet, the applet can be identified in the HTML.
    > Given one Jar might contain one applet, and two
    > applications, this is quite handy.
    >
    > Further, if this Jar is a 'library' it might also not need
    > a manifest.
    >
    > * Sure, the manifest file can provide information
    > beyond 'main class', but that seems to be what
    > they are most commonly used to identify.
    >
    > (+ see what Lew was saying, re. JAR/WAR)
    >
    > Andrew T.
    Mike, Jan 3, 2007
    #7
  8. Mike wrote:

    Please refrain from top-posting.

    > My main concern about the JAR file was the first line shown below which
    > had its first entry as zero, which I am guessing is file size. However,
    > since three people read this mesaage and did not comment on it I assume
    > this is normal.
    >
    > 0 Tue Jan 02 16:15:12 GMT 2007 META-INF/


    No. I meant to comment, but forgot.
    This simply represents the directory in which the
    manifest is stored. If using packages, you should
    also see lost of 'empty' entries for each directory
    in the package statements, AFAIR.

    Oh, and the email thing - you hit the 'wrong button',
    (chuckle) I know the feeling.. but am hoping you
    will take more care in future.

    Andrew T.
    Andrew Thompson, Jan 3, 2007
    #8
  9. Mike

    Mike Guest

    Not sure what "top-posting" is. Thanks for taking time to comment on
    the manifest directory. Don't worry, in future, I will be especially
    careful about clicking the right button.

    Andrew Thompson wrote:
    > Mike wrote:
    >
    > Please refrain from top-posting.
    >
    > > My main concern about the JAR file was the first line shown below which
    > > had its first entry as zero, which I am guessing is file size. However,
    > > since three people read this mesaage and did not comment on it I assume
    > > this is normal.
    > >
    > > 0 Tue Jan 02 16:15:12 GMT 2007 META-INF/

    >
    > No. I meant to comment, but forgot.
    > This simply represents the directory in which the
    > manifest is stored. If using packages, you should
    > also see lost of 'empty' entries for each directory
    > in the package statements, AFAIR.
    >
    > Oh, and the email thing - you hit the 'wrong button',
    > (chuckle) I know the feeling.. but am hoping you
    > will take more care in future.
    >
    > Andrew T.
    Mike, Jan 4, 2007
    #9
  10. Mike wrote:
    > Not sure what "top-posting" is.


    "Your soaking in it"*

    Or to put that a far less obscure way. You were
    doing it right then, by *posting* your reply, on
    *top* of what you were replying to.

    Notice how you can read this response, logically
    from top to bottom?

    * From an ancient Oz ad, for dish-washing detergent.

    Andrew T.
    Andrew Thompson, Jan 4, 2007
    #10
  11. Mike

    Ian Wilson Guest

    Mike top-posted:
    > Not sure what "top-posting" is.


    Allow me to illustrate ...

    A: Written English conversations normally flow from top to bottom.

    Q: What do you mean?

    A: Because it makes it harder to follow the conversation.

    Q: Why shouldn't I top-post?

    Now read the above four sentences in reverse (top-posted) order.
    Ian Wilson, Jan 4, 2007
    #11
    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. Arnold Peters
    Replies:
    0
    Views:
    554
    Arnold Peters
    Jan 5, 2005
  2. muttley
    Replies:
    0
    Views:
    2,688
    muttley
    Oct 20, 2005
  3. cyberco
    Replies:
    4
    Views:
    3,724
    Roedy Green
    Feb 14, 2006
  4. Arnold Peters
    Replies:
    0
    Views:
    637
    Arnold Peters
    Jan 5, 2005
  5. B
    Replies:
    9
    Views:
    305
Loading...

Share This Page