6 Replies Latest reply on Nov 8, 2006 12:35 PM by l_richy007

    JBossIDE-Tutorial problem.

      I followed JBossIDE-Tutorial.pdf to create the fibo application. Everything is okay now.

      When I try to run this app, it is okay, index.html come out.

      But when I sibmit the form, it report error as :

      type Exception report
      message
      description The server encountered an internal error () that prevented it from fulfilling this request.
      exception
      javax.servlet.ServletException: Lookup of java:/comp/env/ failed
      myweb.web.computeServlet.init(computeServlet.java:57)
      org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
      org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:95)
      org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
      org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
      org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
      org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
      org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
      org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
      org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
      java.lang.Thread.run(Thread.java:595)
      note The full stack trace of the root cause is available in the Apache Tomcat/5.5.17 logs.
      --------------------------------------------------------------------------------
      Apache Tomcat/5.5.17

      After debuging, I found this error is caused by casting:

      home = (FiboHome) PortableRemoteObject.narrow(ref, FiboHome.class);

      The EJB FiboEJB already is there.

      What's the wrong with this jboss application?

        • 1. Re: JBossIDE-Tutorial problem.
          ianfmc

          Hi: I'm certainly not an expert, but had similar problems. When you deploy the application, does is say:

          Bound EJB Home 'Fibo' to jndi 'ejb/Fibo'

          in the log? HTH.

          • 2. Re: JBossIDE-Tutorial problem.
            armyking

            Remove the FiboEJB-clint.jar from FiboWeb.war when do the Packaging Configurations.

            • 3. Re: JBossIDE-Tutorial problem.

              After removing FiboEJB-client.jar form FiboWeb.war, I still got the error as below:

              18:13:40,968 ERROR [[compute]] Allocate exception for servlet compute
              javax.servlet.ServletException: Lookup of java:/comp/env/ failed
              at myweb.web.computeServlet.init(computeServlet.java:57)
              at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1105)
              at org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:757)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
              at org.jboss.web.tomcat.tc5.session.ClusteredSessionValve.invoke(ClusteredSessionValve.java:95)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
              at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
              at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
              at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
              at java.lang.Thread.run(Thread.java:595)

              • 4. Re: JBossIDE-Tutorial problem.

                After deploying the app, the info as
                18:20:14,687 INFO [EjbModule] Deploying Fibo
                18:20:14,906 INFO [ProxyFactory] Bound EJB Home 'Fibo' to jndi 'ejb/Fibo'
                18:20:14,906 INFO [EJBDeployer] Deployed: file:/C:/jboss-4.0.4/server/all/tmp/deploy/tmp38102FiboApp.ear-contents/FiboEJB.jar
                18:20:14,968 INFO [TomcatDeployer] deploy, ctxPath=/fibo, warUrl=.../tmp/deploy/tmp38102FiboApp.ear-contents/FiboWeb-exp.war/
                18:20:15,406 INFO [JBossCacheManager] init(): replicationGranularity_ is 0 and invaldateSessionPolicy is 2
                18:20:15,484 INFO [JBossCacheManager] Starting JBossManager
                18:20:15,593 INFO [EARDeployer] Started J2EE application: file:/C:/jboss-4.0.4/server/all/deploy/FiboApp.ear

                ejb/Fibo already there, why servlet can not reference it in following code?
                Object ref = context.lookup("java:/comp/env/ejb/Fibo");

                OR

                Object ref = context.lookup("ejb/Fibo");

                • 5. Re: JBossIDE-Tutorial problem.

                  Is the / needed before comp

                  • 6. Re: JBossIDE-Tutorial problem.

                    try to change the file jboss-web.xml
                    by

                    <ejb-ref>
                     <ejb-ref-name>ejb/Fibo</ejb-ref-name>
                     <jndi-name>Fibo</jndi-name>
                     </ejb-ref>