[jboss-user] [JNDI/Naming/Network] - Re: javax.naming.NameNotFoundException: CMPHome not bound

mallikarjun_nbsg do-not-reply at jboss.com
Thu May 15 03:25:50 EDT 2008


InitialContext ic = new InitialContext();
  | 			Object ojb= ic.lookup("java:comp/env/ejb/CMPHome");
  | 			home = (CMPHome)PortableRemoteObject.narrow(ojb, EmpBean.class);

JMS- Console tree view

[img]java:comp namespace of the Employee Session bean:
  +- UserTransaction (class: javax.transaction.UserTransaction)
  +- env (class: org.jnp.interfaces.NamingContext)
  |   +- jdbc (class: org.jnp.interfaces.NamingContext)
  |   |   +- MySql[link -> java:/DefaultDS] (class: javax.naming.LinkRef)
  |   +- ejb (class: org.jnp.interfaces.NamingContext)
  |   |   +- CMPHome[link -> CMPHome] (class: javax.naming.LinkRef)[/img]

The Exception we are getting INFO: Exception in ejbCreate javax.naming.NamingException: Could not dereference object [Root exception is javax.naming.NameNotFoundException: CMPHome not bound]

1. Does the Initinal Context requires any properties as we do in the client side?
2. Is the lookup path correct?

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

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



More information about the jboss-user mailing list