1 Reply Latest reply on Nov 24, 2005 4:28 AM by kabirkhan

    EJB 3.0 gives me name not bound error

    rnilay81

      I hava stateless session bean in ejb3.0.

      When i call client it gives me following error.


      Exception in thread "main" javax.naming.NameNotFoundException: Hello not bound
      at org.jnp.server.NamingServer.getBinding(NamingServer.java:491)

      My client is like this
      public class TestClient
      {

      public static void main(String args[])throws Exception
      {
      Context context = new InitialContext();
      System.out.println("Looking up HelloWorld");
      Hello helloWorld = (Hello)context.lookup("Hello");
      helloWorld.sayHello( );
      }
      };

      I know it has something to do with JNDI. But without deployment descriptor ,where should i specify the JNDI mapping ?

      Please Help.

      Thanks in advance

        • 1. Re: EJB 3.0 gives me name not bound error
          kabirkhan

          One proxy is created which implements ALL the local interfaces, and one is created which implements ALL the remote interfaces. Each proxy is bound in JNDI under the _fully_qualified_name_ of the first interface it implements.

          You can override this by using the @RemoteBinding/@LocalBinding annotations - there is a tutorial for this in the distribution.