6 Replies Latest reply on Jul 7, 2003 12:35 AM by pranav

    error 404 no default context

    joker1103

      Hi all and excuse me!
      I have windows 2000 professional and jdk 1.4.0.
      I have decompressed jboss.
      I start it running run.bat.
      But when I try:
      http://localhost:8080/
      It responde with an error

      ----------------------------------------------------
      No Default Context
      There is no default context registered with this server.
      Contexts known to this server are:
      WebApplicationContext[/moltiplica,jar:file:/C:/Java/jboss/server/all/tmp/deploy/server/all/deploy/moltiplica.war/30.moltiplica.war!/]

      WebApplicationContext[/invoker,file:/C:/Java/jboss/server/all/deploy/http-invoker.sar/invoker.war/]

      WebApplicationContext[/jmx-console,file:/C:/Java/jboss/server/all/deploy/jmx-console.war/]

      WebApplicationContext[/axis,JBossAxis]

      The links above may not work if a virtual host is configured
      ----------------------------------------------------

      I have tryed with jboss 3.0.6 and jboss 3.2.1 but I have every time the same error

      What I wrong? Need some special task for the installation?

      Tnk

        • 1. Re: error 404 no default context
          haraldgliebe

          There's nothing wrong, you simply don't have any web-app bound to the root context path. You can access the deployed web applications with the linkes on the page your getting.
          If you want to bind your webapp as default web-app, configure the context-root in WEB-INF/jboss-web.xml file of your war:

          <?xml version="1.0"?>
          <!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.3V2//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_3_2.dtd">

          <jboss-web>
          <context-root>/</context-root>
          </jboss-web>

          Regards,
          Harald

          • 2. Re: error 404 no default context
            sysuser1

            Can you or someone elaborate pls.I have a similar error.
            HTTP Status 500 - No Context configured to process this request

            I get this error when I try
            http://localhost:8080

            I also have a example ejb deployed Interest.As suggested above I have jboss-web.xml as follows

            <?xml version="1.0" encoding="UTF-8"?>

            <jboss-web>
            <ejb-ref>
            <ejb-ref-name>ejb/Interest</ejb-ref-name>
            <jndi-name>interest/Interest</jndi-name>
            </ejb-ref>
            <context-root>/</context-root>


            </jboss-web>


            But when I try http://localhost:8080/interest I get same error as above

            In addition I see following error in the log

            13:24:03,149 INFO [Engine] StandardHost[localhost]: MAPPING configuration error
            for request URI /
            13:24:14,649 INFO [Engine] StandardHost[localhost]: MAPPING configuration error
            for request URI /interest

            I have some error displayed in log for Mbean as well.
            which I am not able to figure out.

            I thought using JBOSS will be piece of cake, heck it is not.I am completely frustrated.Can some one guide me....

            • 3. Re: error 404 no default context
              haraldgliebe

              Hi,

              do you get any error messages when you deploy the web application?

              What is http://localhost:8080/interest ?
              Do you have a Servlet mapped to this URL?

              Your jboss-web.xml seems correct, could you please also post your web.xml file.

              Regards,
              Harald

              • 4. Re: error 404 no default context
                sysuser1

                Here is the web.xml file

                <?xml version="1.0" encoding="UTF-8"?>

                <web-app>
                <!-- ### Servlets -->

                <servlet-name>InterestServlet</servlet-name>
                <servlet-class>org.jboss.docs.interest.InterestServlet</servlet-class>

                <servlet-mapping>
                <servlet-name>InterestServlet</servlet-name>
                <url-pattern>/InterestServlet</url-pattern>
                </servlet-mapping>

                <welcome-file-list>
                <welcome-file>home.html</welcome-file>
                </welcome-file-list>

                <!-- ### EJB References (java:comp/env/ejb) -->
                <ejb-ref>
                <ejb-ref-name>ejb/Interest</ejb-ref-name>
                <ejb-ref-type>Session</ejb-ref-type>
                org.jboss.docs.interest.InterestHome
                org.jboss.docs.interest.Interest
                </ejb-ref>

                </web-app>


                I get no context error when I deploy the web application

                • 5. Re: error 404 no default context
                  sysuser1

                  I also get error messages while trying to start JBOSS related to Mbeans.Not sure whether they are related.Do I need to do some setting with Mbeans ?Can you help pls ...

                  • 6. Re: error 404 no default context
                    pranav

                    See...there is no application configured to the ROOT context in case of JBoss.
                    The error message is telling you the same thing, read it carefully. To check your JBoss installation try this http://localhost:8080/jmx-console, it will start the JMX Console for you.

                    Cheers