1 Reply Latest reply on Sep 24, 2001 8:58 AM by samplecode

    The EJB servlet cannot call Interest Bean

    ipozeng

      Hi,friends

      After installing JBoss-2.4.1_Tomcat-3.2.3 the JSP and servlet examples work fine.
      But interest example doesnot work in browser.

      I test the interest example as below it works !
      cd D:\JBoss-2.4.1_Tomcat-3.2.3\jboss\examples\interest
      java InterestClient


      However after copy the EJB.class anf EJB.java into
      D:\JBoss-2.4.1_Tomcat-3.2.3\tomcat\webapps\ROOT\WEB-INF\classes
      i test it in IE by typing http://localhost:8080/servlet/EJB it failed
      with a message "Could not connect to Interest bean. Is EJB Container running?" .

      In D:\Allen\JBoss-2.4.1_Tomcat-3.2.3\tomcat\webapps\ROOT\WEB-INF dir:

      [web.xml]
      <?xml version="1.0" encoding="ISO-8859-1"?>

      <!DOCTYPE web-app
      PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.2//EN"
      "http://java.sun.com/j2ee/dtds/web-app_2_2.dtd">

      <web-app>

      <servlet-name>EJB</servlet-name>
      <servlet-class>EJB</servlet-class>

      <ejb-ref>
      <ejb-ref-name>Interest</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      com.web_tomorrow.interest.InterestHome
      com.web_tomorrow.interest.Interest
      </ejb-ref>
      </web-app>

      [jboss-web.xml]
      <?xml version="1.0" encoding="ISO-8859-1"?>
      <jboss-web>
      <ejb-ref>
      <ejb-ref-name>Interest</ejb-ref-name>
      <jndi-name>interest/Interest</jndi-name>
      </ejb-ref>
      </jboss-web>


      Any suggestions are appreciated!