1 Reply Latest reply on Feb 5, 2003 9:03 AM by Sergio

    Accessing EJB Interest from servlet

    Janulrich01 Newbie


      I've got a problem with running an example InterestServlet in spite of the fact the InterestClient runs correctly. I've got the message:


      root cause

      javax.naming.NamingException: Cannot create resource instance
      at org.apache.naming.factory.EjbFactory.getObjectInstance(Unknown Source)


      javax.servlet.ServletException: Cannot create resource instance
      at org.jboss.docs.interest.InterestServlet.init(org/jboss/docs/interest/InterestServlet.java:48)

      ...
      ...
      ...

      root cause

      javax.naming.NamingException: Cannot create resource instance
      at org.apache.naming.factory.EjbFactory.getObjectInstance(Unknown Source)


      ...
      ...
      ...
      My web.xml sounds like this:

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



      <servlet-mapping>
      <servlet-name>interest</servlet-name>
      <url-pattern>/interestServlet</url-pattern>
      </servlet-mapping>


      <ejb-ref>
      <ejb-ref-name>interest/Interest</ejb-ref-name>
      <ejb-ref-type>Session</ejb-ref-type>
      org.jboss.docs.interest.Interest
      org.jboss.docs.interest.InterestBean
      </ejb-ref>


      I can see interest/Interest on http://localhost:8082/
      My java application (InterestClient) works correctly.

      I do not have an EAR file (what's this?) and I havn't defined the jboss-web.xml file (where should it be copied and why?).


      I'll appreciate any help.

      Jan Ulrich