Hi,

I'm trying to do a JNDI Lookup in Resin using the Hessian libraries wit
Resin 3.1.3


 
My Client is
 
                        Hashtable<String, String> env = new
Hashtable<String, String>(5);                                                   
               
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.caucho.ejb.hessian.HessianContextFactory");
                        
                        env.put(Context.PROVIDER_URL, 
"http://localhost:8080/hessian";);
                        
                        InitialContext ic = new InitialContext(env);
                        
                        Object objRef = ic.lookup(SampleHome.class.getName());
                        System.out.println("obj ref is : " +objRef.toString());

                        System.out.println(objRef.getClass().getName());

                        Object obj = PortableRemoteObject.narrow( objRef,
                                        SampleHome.class);
                        System.out.println(obj.getClass().getName());
                        SampleHome sampleHome = (SampleHome)  obj;


In my web.xml file i've added the following


<ejb-server config-directory="WEB-INF"/>
<servlet servlet-name='hessian'
servlet-class='com.caucho.hessian.EJBServlet'/>   
<servlet-mapping url-pattern='/hessian/*' servlet-name='hessian'/>

The exception im getting is :

com.caucho.config.ConfigException: java.io.IOException: bad status: 404
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
/hessian/ was not found on this server.
<p /><hr />
<small>
Resin/3.1.3
</small>
</body></html>

        at
com.caucho.ejb.hessian.HessianClientContainer.getRemoteClassName(HessianClientContainer.java:328)
        at
com.caucho.ejb.hessian.HessianClientContainer.getRemoteClass(HessianClientContainer.java:291)
        at
com.caucho.ejb.hessian.HessianClientContainer.getRemoteStubClass(HessianClientContainer.java:212)
        at
com.caucho.ejb.hessian.HessianClientContainer.<init>(HessianClientContainer.java:85)
        at
com.caucho.ejb.hessian.HessianClientContainer.find(HessianClientContainer.java:100)
        at com.caucho.ejb.hessian.HessianModel.lookup(HessianModel.java:134)
        at com.caucho.naming.ContextImpl.lookupImpl(ContextImpl.java:187)
        at com.caucho.naming.ContextImpl.lookup(ContextImpl.java:157)
        at javax.naming.InitialContext.lookup(InitialContext.java:363)
        at WAS.main(WAS.java:49)
Caused by: java.io.IOException: bad status: 404
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
/hessian/ was not found on this server.
<p /><hr />
<small>
Resin/3.1.3
</small>
</body></html>

        at com.caucho.ejb.hessian.MetaStub.call(MetaStub.java:87)
        at com.caucho.ejb.hessian.MetaStub.call(MetaStub.java:54)
        at
com.caucho.ejb.hessian.HessianClientContainer.getRemoteClassName(HessianClientContainer.java:325)
        ... 9 more


Can anyone help me out with this?

Thanks in advance,
Jason


-- 
View this message in context: 
http://www.nabble.com/Unable-to-do-JNDI-lookup-in-resin-tp15412358p15412358.html
Sent from the Resin mailing list archive at Nabble.com.



_______________________________________________
resin-interest mailing list
resin-interest@caucho.com
http://maillist.caucho.com/mailman/listinfo/resin-interest

Reply via email to