7 Replies Latest reply on Mar 12, 2002 12:39 PM by matn1

    Tring to deploy an Apache WebApp under JBOSS

    matn1

      I'm getting the following excpetion when trying to deploy
      a sevlet jar file which runs under Apache, but when I
      copy it to the deploy directory under JBoss I get the following error.

      [INFO,Default] JBoss-2.4.4 Started in 0m:17s.615
      [INFO,AutoDeployer] Auto deploy of file:/G:/JBoss-2.4.4_Tomcat-4.0.1/jboss/deploy/MikeApp1.jar
      [INFO,J2eeDeployer] Deploy J2EE application: file:/G:/JBoss-2.4.4_Tomcat-4.0.1/jboss/deploy/MikeApp1.jar
      [ERROR,AutoDeployer] DeploymentInfo failed:file:/G:/JBoss-2.4.4_Tomcat-4.0.1/jboss/deploy/MikeApp1.jar
      org.jboss.deployment.J2eeDeploymentException: no deployment descriptor (META-INF/ejb-jar.xml, WEB-INF/web.xml, META-INF/applicatio
      n.xml) found
      at org.jboss.deployment.LegacyInstaller.determineType(LegacyInstaller.java:384)
      at org.jboss.deployment.LegacyInstaller.execute(LegacyInstaller.java:135)
      at org.jboss.deployment.InstallerFactory.install(InstallerFactory.java:120)
      at org.jboss.deployment.J2eeDeployer.installApplication(J2eeDeployer.java:409)
      at org.jboss.deployment.J2eeDeployer.deploy(J2eeDeployer.java:185)
      at java.lang.reflect.Method.invoke(Native Method)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
      at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
      at org.jboss.deployment.AutoDeployer.deploy(AutoDeployer.java:395)
      at org.jboss.deployment.AutoDeployer.run(AutoDeployer.java:233)
      at java.lang.Thread.run(Thread.java:484)

      I seem to have the web.xml file under the WEB-INF directory in my jar, but do I need to do or supply anything else?
      Also, how do I run it under JBoss once deployed i.e
      http://localhost:8080/jboss/MikeApp1/Hello.jsp

      -- Thanks

        • 1. Re: Tring to deploy an Apache WebApp under JBOSS

          Can you post the output of

          jar -tf MikeApp1.jar

          Regards,
          Adrian

          • 2. Re: Tring to deploy an Apache WebApp under JBOSS
            matn1

            Adrian please find the output of .jar.
            It contains Simple JSP, Servlet, and HTML.
            Do I have to deploy this as a .war file, .ear, or can I keep as a jar. Then how will I execute under JBoss?

            -- Thanks

            G:\JBoss-2.4.4_Tomcat-4.0.1\jboss\deploy>dir
            Volume in drive G has no label.
            Volume Serial Number is C090-B276

            Directory of G:\JBoss-2.4.4_Tomcat-4.0.1\jboss\deploy

            03/12/02 08:39a .
            03/12/02 08:39a ..
            12/29/01 02:06a 88 deploy.txt
            03/06/02 03:19p lib
            03/11/02 12:10p 6,126 MikeApp1.jar
            12/29/01 02:18a 12,338 tomcat-test.ear
            6 File(s) 18,552 bytes
            6,750,883,840 bytes free

            G:\JBoss-2.4.4_Tomcat-4.0.1\jboss\deploy>d:\jdk1.3.1\bin\jar -tvf MikeApp1.jar
            0 Mon Mar 11 12:10:48 EST 2002 META-INF/
            71 Mon Mar 11 12:10:48 EST 2002 META-INF/MANIFEST.MF
            0 Thu Mar 07 14:15:52 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/
            421 Thu Mar 07 10:02:46 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/Hello.htm
            446 Thu Mar 07 10:03:18 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/Hello.jsp
            0 Thu Mar 07 13:47:12 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/
            0 Thu Mar 07 15:24:00 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/classes/
            0 Thu Mar 07 15:24:00 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/classes/dependency cache/
            1347 Thu Mar 07 15:24:00 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/classes/dependency cache/moreser
            vlets.dependency
            1451 Thu Mar 07 11:08:40 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/classes/HelloWebApp.class
            0 Thu Mar 07 15:24:00 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-/moreservlets/
            1415 Thu Mar 07 15:24:00 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/classes/moreservlets/HelloServle
            t2.class
            1350 Thu Mar 07 15:27:28 EST 2002 g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/web.xml

            • 3. Re: Tring to deploy an Apache WebApp under JBOSS

              Hi,

              You don't want the directories in the jar.
              e.g.
              You should have
              WEB-INF/web.xml
              not
              g:/JBoss-2.4.4_Tomcat-4.0.1/catalina/webapps/MikeApp1/WEB-INF/web.xml

              try
              cd \JBoss-2.4.4_Tomcat-4.0.1\catalina\webapps\MikeApp1
              jar -cf MikeApp1.jar *

              Regards,
              Adrian

              • 4. Re: Tring to deploy an Apache WebApp under JBOSS

                To answer the first part of your question,
                you could just copy the directory MikeApp1 into
                jboss\deploy

                Regards,
                Adrian

                • 5. Re: Tring to deploy an Apache WebApp under JBOSS
                  matn1

                  Adrian:
                  Good call, I jarred up MikeApp1 and got the .jar deployed without the directory stuff from catalina and put it in the deploy directory under JBoss, it worked fine.
                  I also went to the FAQ about those nasty Error 500 mappings and created a workaround for the index.html under a .war subdirectory.
                  The only question I have is on the last point. When I
                  tried copying the the entire Catalina webapp directory MikeApp1 and put it under deploy, I can put in my URL the following http://localhost:8080/MikeApp1/
                  and see my 2 links I normally would, Hello.htm and Hello.jsp, but the problem is the hperlinks show another "/" (i.e.http://localhost:8080/MikeApp1//Hello.htm). Then
                  when I click on it, I get a 404 error telling me the resource is not available.

                  -- Any thoughts,
                  Thanks, Mike

                  • 6. Re: Tring to deploy an Apache WebApp under JBOSS

                    Try naming the directory
                    MyApp1.war

                    I think the lack of an extension might be confusing
                    something.

                    Regards,
                    Adrian

                    • 7. Re: Tring to deploy an Apache WebApp under JBOSS
                      matn1

                      That Works, thanks, for getting me going :)