2 Replies Latest reply on Apr 20, 2004 9:37 PM by calffin

    Strange problem when deploy the servlet in jboss

    calffin Newbie

      I use jboss-3.0.8 integrated with jetty as my j2ee server. I write a servlet which receive the request outside and delegate the request to the EJB which the servlet refrences. I use the remote interface of the EJB in the servlet. But the servlet is not directly with the EJB. I write a middle class as buseness delegate between them. I edit the web.xml and jboss-web.xml file which both introduce the information of the EJB refrenced.
      After I copy the generated WAR file to the deploy directory, I start up the jboss server. But I find the WAR file can't be deployed. The error message is below:
      Caused by: javax.ejb.EJBException: null; CausedByException is:
      AccountFacadeLocal not bound
      at server.web.AccountFacadeBD.(AccountFacadeBD.java:35)
      at server.web.AccountFacadeBD.getInstance(AccountFacadeBD.java:43)
      at server.web.Accountlet.(Accountlet.java:27)


      I am surprised by the error message because I never use the local interface of the EJB. I don't know whether the servlet can refrence the local interface of the EJB in jboss-3.0.8. I see the jboss-web dtd in the docs/ directory , it only has the ejb-ref element , has no ejb-local-ref element.
      Anybody can help me?
      Any idea is welcome!
      Thank you!
      Best regards!

        • 1. Re: Strange problem when deploy the servlet in jboss
          Kabir Khan Master

          Post the relevant bits of your jboss.xml, jboss-web.xml and web.xml files

          • 2. Re: Strange problem when deploy the servlet in jboss
            calffin Newbie

            Thank you ,kabkhan. My jboss.xml is below:

            <ejb-name>Account</ejb-name>
            <jndi-name>AccountBean</jndi-name>
            <local-jndi-name>AccountLocal</local-jndi-name>




            <ejb-name>AccountFacade</ejb-name>
            <jndi-name>AccountFacadeBean</jndi-name>
            <local-jndi-name>AccountFacadeLocal</local-jndi-name>
            <ejb-local-ref>
            <ejb-ref-name>ejb/AccountLocal</ejb-ref-name>
            <jndi-name>AccountLocal</jndi-name>
            </ejb-local-ref>



            </enterprise-beans>


            My web.xml is below:

            <servlet-name>accountlet</servlet-name>
            <servlet-class>server.web.Accountlet</servlet-class>
            <load-on-startup>1</load-on-startup>

            <servlet-mapping>
            <servlet-name>accountlet</servlet-name>
            <url-pattern>/servlet/*</url-pattern>
            </servlet-mapping>
            <welcome-file-list>
            <welcome-file>index.jsp</welcome-file>
            </welcome-file-list>
            <error-page>
            <error-code>404</error-code>
            /error.jsp
            </error-page>

            <ejb-ref>
            <ejb-ref-name>ejb/AccountFacade</ejb-ref-name>
            <ejb-ref-type>Session</ejb-ref-type>
            server.ejb.accountapplication.AccountFacadeHome
            server.ejb.accountapplication.AccountFacade
            </ejb-ref>


            My jboss-web.xml is below:
            <jboss-web>
            <ejb-ref>
            <ejb-ref-name>ejb/AccountFacade</ejb-ref-name>
            <jndi-name>AccountFacadeBean</jndi-name>
            </ejb-local-ref>
            </jboss-web>