5 Replies Latest reply on Dec 8, 2006 7:04 AM by pyrokenesis

    ear file claims no meta-inf in war

    pyrokenesis

      Hello, new to JBoss but not really a novice with development, but cant seem to get the most basic helloworld jsp page on my JBoss server.

      My system setup is a Windows 2003 OS, Apache2 server, bundled with Tomcat. IIS is obviously working as well, but turned off.

      I have Tomcat on port 8082 and I have JBoss on port 8084. Apache, Tomcat and IIS all work fine. JBoss seems to be working fine but the book I'm using (Beginning Java EE 5: From Novice to Professional, ISBN: 1590594703) has some simple steps to get a jsp showing on server that I cant implement.

      After setup, I create a web-app.war with an index.jsp, but then I try to create the helloworld.ear with the following command:

      jar cf helloworld.ear web-app.war META-INF

      I get an error saying "META-INF: no such file or directory".

      Surely someone knows how dumb I'm being. Any help is appreciated.

        • 1. Re: ear file claims no meta-inf in war
          jaikiran


          jar cf helloworld.ear web-app.war META-INF


          Had a look at the syntax of jar cf. Here's the syntax:

          jar cf jar-file input-file(s)


          The command that you are using mentions META-INF as an input file but such a file is not present hence its throwing the error


          • 2. Re: ear file claims no meta-inf in war
            weston.price

            By default, a META-INF directory is ignored by the jar utility being that it's a special directory in the archive. To tell the jar tool to do what you want execute

            jar cvfM helloworld.ear web-app.war META-INF

            Use of the 'M' flag shuts the default behavior off. Note, usually people use Ant for this type of stuff being that when you use the above command a MANIFEST.MF file is not generated for you automatically. If you want to use the form above and you required a MANIFEST.MF file, you will have to write/generate it yourself and place it in the META-INF directory.

            Note...as previously mentioned, META-INF has to exist ;-)

            • 3. Re: ear file claims no meta-inf in war
              pyrokenesis

              Yes sorry to have wasted your time fellas but I missed the part where your supposed to create the META-INF directory... DOH!!!

              Feel free to give me a cyber slap!

              Thanx for the quick response.

              • 4. Re: ear file claims no meta-inf in war
                weston.price

                :-)

                No problem. Do take note thought that when you do the jar command, you will have to use the 'M' flag if you want it to take your META-INF directory. So, it's not a total loss ;-)

                • 5. Re: ear file claims no meta-inf in war
                  pyrokenesis

                  Will do, thanx.