[jboss-user] [JNDI/Naming/Network] - invoking remote session bean NotContextException

srki do-not-reply at jboss.com
Thu Nov 2 18:24:15 EST 2006


Hi,

I am having trouble when looking up for a remote session bean from my ejb application.  I am running jboss 4.0.4 with ejb3.0.  I am trying to access a remote computer running jboss 4.0.4 but with 2.1 option.  Instead of deploying remotely on a different machine I tried deploying the third party application in my instance of jboss and everything works fine.  



  | Properties props = new Properties();	props.setProperty(Context.INITIAL_CONTEXT_FACTORY,"org.jboss.security.jndi.JndiLoginInitialContextFactory");
  | props.setProperty(Context.SECURITY_PRINCIPAL, "admin");
  | props.setProperty(Context.SECURITY_CREDENTIALS, "admin");
  | props.setProperty(Context.PROVIDER_URL, "jnp://192.168.10.130:1099/");
  | 		
  | Context ctx = new InitialContext(props);	
  | Object object = ctx.lookup( "ejb/com/blah/Manager/remote" );
  | 		ManagerRemoteHome home = (ManagerRemoteHome)PortableRemoteObject.narrow ( object, ManagerRemoteHome.class);
  | 
  | 		ManagerRemote manager = home.create();
  | 
  | I get an exception when executing this line
  | ManagerRemoteHome home = (ManagerRemoteHome)PortableRemoteObject.narrow ( object, ManagerRemoteHome.class);
  | 
  | 2006-11-02 15:02:49,194 ERROR [STDERR] javax.naming.NotContextException
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:285)
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at org.jnp.server.NamingServer.lookup(NamingServer.java:270)
  | 2006-11-02 15:02:49,194 ERROR [STDERR] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  | 
  | 








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

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



More information about the jboss-user mailing list