5 Replies Latest reply on Oct 7, 2008 2:45 PM by qtrchicken

    Newbie Problem...

    qtrchicken

      Ok, I just installed JBoss and I'm evaluating it for a possible upcoming project.

      Here's the problem. I'm running on Suse 11 and when I start it, I can get to the JBoss server page. However, I can't get any further. I created an EAR file and copied it to the deploy directory and restarted the server with an run.sh -c all. When I go to localhost:8080/hello, I get the "resource not available" error.

      I created an simple index.jsp file, META-INF/application.xml file and created a web-app.war file. Then I wrapped up everything in the EAR file.

      Am I missing something silly or any suggestions?

        • 1. Re: Newbie Problem...
          qtrchicken

          Ok, I can get a test.war file to come up in the default deploy directory, but my EAR still says "resource unavailable". Am I missing a step to deploy an EAR on JBoss?

          • 2. Re: Newbie Problem...
            peterj

            Did you place your EAR in server/all/deploy? (By the way, the only difference between the 'all' and 'default' configuration is that the 'all' configuration supports clustering. If you do not need clustering, run th4e 'default' config instead, in which case the EAR should go in server/default/deploy.)

            If that doesn't help, what are the contents of your EAR file? Use "jar -tf" to list those contents. Also, post your application.xml file. Finally, are there any exception stack traces on the console? If so, post those also.

            Remember to enclose your XML text in UBBCode "code" tags - you can do this by selecting the XML text and clicking the Code button above the editor window. Also, click the Preview button to ensure that the formatting is correct and the XML text shows up before posting.

            • 3. Re: Newbie Problem...
              qtrchicken

              I am using the default deploy directory, but I've tried it in all.

              No error messages or even any messages when I copy the EAR to the deploy directory. It's like it's not registering it's existence.

              Here are the EAR contents
              META-INF/
              META-INF/MANIFEST.MF
              web-app.war
              META-INF/application.xml

              Here is application.xml.
              <?xml version="1.0"?>

              <display-name>Hello Java EE World!</display-name>


              <web-uri>web-app.war</web-uri>
              <context-root>/hello</context-root>


              </application

              • 4. Re: Newbie Problem...
                peterj

                Apparently you did not read (or understand) my last paragraph.

                Try this. Bring up the app server (the 'default' config) without having the EAR deployed. Once you see the "Started in xxx seconds" message on the console, copy the web-app.war file to the server/default/deploy directory. You should then see log output that looks like this:

                10:31:14,097 INFO [TomcatDeployer] deploy, ctxPath=/web-app, warUrl=.../tmp/deploy
                /tmp44384web-app-exp.war/

                Then access the app using http://localhost:8080/web-app. If that does not work, try http://localhost:8080/web-app/index.jsp (or whatever the name is for your home page). If that still does not work, post the contents of web-app.war and the WEB-INF/web.xml file.

                • 5. Re: Newbie Problem...
                  qtrchicken

                  Peter, I think I found the problem. I'm running through a small tutorial and they make no mention of the web.xml. I thought it was odd, but I'm following directions.

                  I created a WEB-INF/web.xml file and created a new web-app.war file and whaalaa it deployed to the server. The demo implies that only the Manifest.MF, application.xml and index.jsp are the only pieces needed for JBoss to do pull up a simple JSP.

                  Here was the original application.xml (sorry about the code... i can be rather dense at times)

                  <?xml version="1.0"?>
                   <application>
                   <display-name>Hello Java EE World!</display-name>
                   <module>
                   <web>
                   <web-uri>web-app.war</web-uri>
                   <context-root>/hellokg</context-root>
                   </web>
                   </module>
                   </application>
                  


                  The web-app.war simply had the index.jsp file inside.