0 Replies Latest reply on Jul 8, 2002 8:17 AM by Mark Ayad

    Resin Jboss (External) NameNotFoundException

    Mark Ayad Newbie

      I'm trying to connect to a EJB running in a jboss server from a jsp running
      on resin, but a javax.naming.NameNotFoundException: ejb/Interest is thrown.
      I guess I'm missing some mapping in a file somewhere. Connecting from a
      standalone client without Resin worked, so I have established that the EJB
      has been deployed ok.

      On Jboss the jboss.xml is:

      <?xml version="1.0" encoding="UTF-8"?>




      Once packaged and deployed a standalone client test was preformed

      using these properties:


      and this main:

      public static void main(String[] args)
      InitialContext jndiContext = new InitialContext);

      Object ref = jndiContext.lookup("ejb/Interest");

      InterestHome home = (InterestHome) PortableRemoteObject.narrow(ref,
      Interest interest = home.create();
      System.out.println(interest.calculateCompoundInterest(1000, 0.10, 2));
      catch (Exception e)

      Works fine.

      Now From Using Resin 2.1.2

      In resin.conf:

      <init-param java.naming.provider.url="localhost:1099"/>

      now the jsp:

      <%@ page import='javax.naming.InitialContext' %>
      <%@ page import='javax.rmi.PortableRemoteObject' %>
      <%@ page import='org.jboss.docs.interest.Interest' %>
      <%@ page import='org.jboss.docs.interest.InterestHome' %>

      // Get a naming context
      InitialContext jndiContext = new InitialContext();
      if(jndiContext != null)out.print("got context");

      // Get a reference to the Interest Bean
      Object ref = jndiContext.lookup("ejb/Interest");

      if(ref != null)out.print("got reference");