[jboss-user] [JBoss Seam] - Problem looking up EJB session bean (Name not bound)

tonylmai do-not-reply at jboss.com
Fri Mar 9 15:07:06 EST 2007


Hello all,

I orginally posted this question on 'JBoss User -> Beginners Corner' and 'JBoss User -> EJB/JBoss' forums but got no response. I am hoping to get better luck with this forum.

Can someone help me with a simple context lookup?

I have a session bean deployed within JBoss 4.0.4 GA AS, JDK 5. My EJB code is as followed:


  | @Stateless
  | @Local(AuthenticatorLocal.class)
  | @Remote(AuthenticatorRemote.class)
  | public class AuthenticatorBean implements Authenticator {



The server started and deployed this session bean without any problem. Here is a snippet of the log:
anonymous wrote : 10:28:10,609 INFO [JmxKernelAbstraction] installing MBean: jboss.j2ee:ear=test.ear,jar=test.jar,name=AuthenticatorBean,service=EJB3 with dependencies:
  | 10:28:10,609 INFO [JmxKernelAbstraction] persistence.units:ear=test.ear,jar=test.jar,unitName=test
  | 10:28:10,625 INFO [EJBContainer] STARTED EJB: com.judots.test.AuthenticatorBean ejbName: AuthenticatorBean


>From an external client, my client is calling:
Properties p = new Properties();
  | p.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
  | p.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
  | p.put(Context.PROVIDER_URL, "jnp://localhost:1099");
  | _intialCtx = new InitialContext(p);
  | 
  | Object authenRef = _intialCtx.lookup("AuthenticatorBean");


This code failed with the following exception:
anonymous wrote : javax.naming.NameNotFoundException: AuthenticatorBean not bound
  | at org.jnp.server.NamingServer.getBinding(NamingServer.java:529)


I tried using various name like "Authenticator", "Authenticator/remote", "AuthenticatorBean/remote" as well as using the physical address for the InitialContext but ended up with the same "'name' not found error. Can some one please help?

Thanks
-tony

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4026742#4026742

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4026742



More information about the jboss-user mailing list