facebook

Invalid EAR contents ?? [Closed]

  1. MyEclipse IDE
  2.  > 
  3. General Development
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #198678 Reply

    Hello,

    I’ve set-up three projects: One for an EJB, one for a web module and a thrid for the EAR. The EJB project is dependend on the web module project which is itself dependend on the EAR project. Deploying the EAR seems to work fine, everything is rebuild and the EAR file is deployed to the server.

    To inspect the complete results, I’ve unpacked the EAR with “jar xvf file.ear” and tried then to look into the generated jar and war files from the other two projects (with “jar tvf <file>”). Unfortunately jar chokes on both files with the following error message:

    Error in JAR file! Cannot locate central header!

    The files are big enough to have content, but they seem not to be a valid archive! Any hints?

    Regards,
    Jörg

    (Eclipse 2.1.1; MyEclipse 2.6.2; JDK 1.4.2; Win XP)

    #198682 Reply

    support-michael
    Keymaster

    We haven’t seen this problem before. Can you send us the jar file and a zip of the 3 projects for further research. We do nothing fancy under the covers when building the EAR so this is interesting.

    Michael
    MyEclipse Support

    #198684 Reply

    Hi Michael,

    I was able to reproduce this creating an empty J2EE project with newly created web and EJB module. I deployed the EAR into jBoss 3.2.1 and extracted the ear myself. The included jar and war file report this error looking into them with “jar tvf” again. I’ve tarred an archive together with the three projects, the resulting ear and the worspace … just missing a upload possibility or an email account to send it to.

    Regards,
    Jörg

    #198698 Reply

    Scott Anderson
    Participant

    Jorg,

    just missing a upload possibility or an email account to send it to.

    Please send it to support@genuitec.com. So we can reference it properly and reply after our analysis, please also include the full URL for this thread in the email.

    –Scott
    MyEclipse Support

    #198719 Reply

    Scott Anderson
    Participant

    Jorg,

    I extracted the EAR.ear file from the MyEclipse.tar.gz file you sent. I then tried ‘jar tvf EAR.ear’ and ‘jar xvf EAR.ear’ with no problems. I then performed the same “tell” and “extraction” operations on EAREJB.jar and EARWeb.war without any problems.

    Perhaps what is happening is that you’re using a different JVM to create the archives / run Eclipse than you are on the commandline to inspect the files? I used JDK 1.4.2_01 from my command line, which I verified with ‘java -version’ and received ‘build 1.4.2_01-b06’.

    –Scott
    MyEclipse Support

    #198725 Reply

    Hi Scott,

    just for the records: I was fooled by the jar.exe. I am using the Cygwin shell and was not aware of the fact, that meanwhile the installed gcc package comes with Java support (never used this before) and contains also a jar.exe. By default it is installed in Cygwin’s /bin that is normally the first element in the path. Using this jar version of gcj to extract the ear, the extracted war and jar files were corrupt. Using the jar from the JDK everything is fine.

    Sorry for confusion and thanks for your answer,
    Jörg

Viewing 6 posts - 1 through 6 (of 6 total)
Reply To: Invalid EAR contents ?? [Closed]

You must be logged in to post in the forum log in