8 Replies Latest reply on Sep 27, 2003 8:28 AM by letiemble

    HTTP ERROR: 404 /fibo/ Not Found

    montia

      Hi,

      I just went through the JBoss IDE Tutorial (http://umn.dl.sourceforge.net/sourceforge/jboss/Tutorial_1.2.0.pdf) and created the project, the deployment descriptors etc. Finally, I deployed and when I try to go to http://localhost:8080/fibo/ I see an HTTP 404 error. Looking in my Eclipse console at the JBoss start log I can see that the FiboApp.ear was incompletely deployed.

      12:01:45,747 INFO [jbossweb] successfully deployed file:/C:/jboss-3.2.1/server/default/tmp/deploy/server/default/deploy/management/web-console.war/29.web-console.war to /web-console
      12:01:46,268 INFO [MainDeployer] Deployed package: file:/C:/jboss-3.2.1/server/default/deploy/management/
      12:01:46,318 ERROR [URLDeploymentScanner] MBeanException: Exception in MBean operation 'checkIncompleteDeployments()'
      Cause: Incomplete Deployment listing:
      Packages waiting for a deployer:

      Incompletely deployed packages:
      [org.jboss.deployment.DeploymentInfo@c770e692 { url=file:/C:/jboss-3.2.1/server/default/deploy/FiboApp.ear }
      deployer: org.jboss.deployment.EARDeployer@174aa60
      status: null
      state: FAILED
      watch: file:/C:/jboss-3.2.1/server/default/deploy/FiboApp.ear
      lastDeployed: 1064343671107
      lastModified: 1064343672000
      mbeans:
      ]MBeans waiting for classes:

      MBeans waiting for other MBeans:


      Has anybody seen this before? Am I doing anything wrong? Any suggestions?

      Thanks in advance,
      Montia

        • 1. Re: HTTP ERROR: 404 /fibo/ Not Found
          montia

          Here's a list of my environment settings:

          Eclipse 2.1.1
          JDK 1.4.1_05
          JBoss 3.2.1
          JBoss-IDE 1.2.0

          • 2. Re: HTTP ERROR: 404 /fibo/ Not Found
            montia

            Hi,

            Looks like I found what the problem is.

            Although, I followed the tutorial step by step (checked twice to ensure I did the exact same thing) and Eclipse displayed a "Deployment successful" message, I could see the following errors in the console when deploying:

            14:19:22,259 INFO [EARDeployer] Init J2EE application: file:/C:/jboss-3.2.1/server/default/deploy/FiboApp.ear
            14:19:25,825 WARN [verifier] EJB spec violation:
            Bean : Fibo
            Section: 22.2
            Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local home interface, if any, in the <local-home> element.
            Info : Class not found: tutorial.interfaces.FiboLocalHome

            14:19:25,845 WARN [verifier] EJB spec violation:
            Bean : Fibo
            Section: 22.2
            Warning: The bean provider must specify the fully-qualified name of the enterprise bean's local interface, if any, in the element.
            Info : Class not found: tutorial.interfaces.FiboLocal
            ...

            I searched for FiboLocal in my Tutorial directory and found that ejb-jar.xml and jboss.xml in the META-INF folder had FiboLocal and FiboLocalHome 'definitions.' I removed those lines from the files, repackaged, and redeployed. Redeployment was succesful and I can now see http://localhost:8080/fibo.

            With the exception of this little problem, I really like the tutorial. Very straightforward. :)

            Thank you,
            Montia

            • 3. Re: HTTP ERROR: 404 /fibo/ Not Found

              Hi,

              I think (with some modesty) that the Tutorial runs pretty well.
              What I can't understand, is how do you get local interfaces although the Tutorial only deals with a remote EJB ?
              Maybe, you should take a look at your XDoclet configuration and see if you haven't has the local subtasks for the EJB generation?

              Laurent.

              • 4. Re: HTTP ERROR: 404 /fibo/ Not Found
                montia

                Hi Laurent,

                Yes, the tutorial is great for getting me started.

                I am attaching a picture of the subtasks I added to the ejbdoclet in my EJB XDoclet Configuration. My settings are the same as those described in the tutorial, yet when I Run XDoclet I get those local configurations in my ejb deployment descriptors.

                • 5. Re: HTTP ERROR: 404 /fibo/ Not Found
                  montia

                  So, I'm not sure what's going on. At least I can manually remove those lines so that's cool.

                  I have to say that after I was able to go to http://localhost:/8080/fibo and see the index page, clicking on Compute generated another error.

                  I saw the following message in my browser:
                  HTTP ERROR: 503 javax.servlet.ServletException: Lookup of java:/comp/env/ failed
                  RequestURI=/fibo/Compute

                  I debugged the application and saw that the error was thrown on the following line in the servlet:
                  Object ref = context.lookup("java:/comp/env/ejb/Fibo");

                  The Title was obtained just fine, but somehow the EJB cannot be obtained.

                  So, I kind of gave up at that point. :)
                  Thank you for replying to my post and if you have any ideas of why the servlet error occurs I'd really appreciate your sharing them with me.
                  Monica

                  • 6. Re: HTTP ERROR: 404 /fibo/ Not Found
                    ecaritos

                    Same error as previous post but can't find the solution.

                    Went to url http://localhost:8080/fibo and I see the index page. I click on the Computer button and generated another error.

                    10:57:20,892 ERROR [Engine] StandardWrapperValve[ComputeServlet]: Allocate exception for servlet ComputeServlet
                    javax.servlet.ServletException: Could not dereference object

                    I debugged the application and saw that the rrow was thrown on the following line in the servlet: Object ref= context.lookup("java:/comp/env/ejb/Fibo");

                    The Title was obtained just fine, but somehow the EJB cannot be obtained.

                    • 7. Re: HTTP ERROR: 404 /fibo/ Not Found
                      montia

                      Hi,

                      I found a fix. I stumbled onto this other topic:
                      http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t= mentioned an inconsistency in the EJB JNDI names in jboss.xml and jboss-web.xml.

                      So, that made me check my respective files. I found the following JNDI names:

                      "ejb/tutorial/Fibo" in jboss.xml

                      and

                      "Fibo" in jboss-web.xml

                      I'm not sure why I had this problem since the bean's jndi-name was set to "ejb/tutorial/Fibo" in both FiboBean.java and ComputeServlet.java.

                      Anyway, correcting jboss-web.xml got rid of the exception that was thrown on retrieving the bean. The application works well now.

                      Sometimes on Running XDoclet I still get those localFibo lines added to my XML files (weirdly, not every time), but I guess I can remove them manually if nothing else works.

                      Thanks Laurent. The tutorial is great. I'm already working on porting a pretty big application from WebSphere to JBoss, and going through your tutorial really helped me get the big picture. It made my life simpler. :)

                      Montia

                      • 8. Re: HTTP ERROR: 404 /fibo/ Not Found

                        Hi,

                        Please to hear such good things.
                        I am very interesting in your feedback and your feature requests. So don't hesitate !!!

                        Laurent.