Here is my code :
...
        public void init() throws ServletException {
           
        
         try {
              Hashtable<String,String> env = new Hashtable<String,String>();    
              env.put(Context.INITIAL_CONTEXT_FACTORY, 
"org.jnp.interfaces.NamingContextFactory");      
              env.put(Context.PROVIDER_URL, "jnp://192.168.0.5:1099");      
              env.put(Context.URL_PKG_PREFIXES, 
"org.jboss.naming:org.jnp.interfaces" );    
              Context context = new InitialContext(env);
                roleBean =(AppRoles) context.lookup("com.ejb.test.AppRoles");
                } catch (NamingException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }

                // TODO Auto-generated method stub
        }
...

Here is the result:
java.lang.RuntimeException: javax.naming.NameNotFoundException: Name containers 
is not bound in this Context
        org.jboss.ejb3.LocalProxy.readObject(LocalProxy.java:54)
        sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        java.lang.reflect.Method.invoke(Unknown Source)
        java.io.ObjectStreamClass.invokeReadObject(Unknown Source)
        java.io.ObjectInputStream.readSerialData(Unknown Source)
        java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        java.io.ObjectInputStream.readObject0(Unknown Source)
        java.io.ObjectInputStream.defaultReadFields(Unknown Source)
        java.io.ObjectInputStream.readSerialData(Unknown Source)
        java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
        java.io.ObjectInputStream.readObject0(Unknown Source)
        java.io.ObjectInputStream.readObject(Unknown Source)
        java.rmi.MarshalledObject.get(Unknown Source)
        org.jnp.interfaces.MarshalledValuePair.get(MarshalledValuePair.java:57)
        org.jnp.interfaces.NamingContext.lookup(NamingContext.java:637)
        org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
        javax.naming.InitialContext.lookup(Unknown Source)
        com.airit.web.RoleWeb.init(RoleWeb.java:55)
        javax.servlet.GenericServlet.init(GenericServlet.java:211)
        
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
        
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
        
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
        
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
        
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
        
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
        
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
        java.lang.Thread.run(Unknown Source)

...

The Jndi name which i am copying and pasting from the jboss application server 
log is:

"2005-07-07 15:15:44,286 INFO  [org.jboss.ejb3.ProxyDeployer] default remote 
binding has jndiName of com.ejb.test.AppRoles"

I can access my session bean successfully when running on the same jvm as jboss 
application server. I get this error when running the client in tomcat 
standalone and trying to access the remote interface from a different machine. 
The remote interface is running I am positive, I just cant get the context . 
Please help.

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

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


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to