You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@geronimo.apache.org by Xh <xh...@yahoo.co.uk> on 2007/07/04 15:20:56 UTC

JNDI remote lookup and ClassCastException

Hi All!

I have successfully deployed Remote Session Stateful Bean.

No I'm trying to connect to it remotely, but lookup method throws ClassCastException.
I'm using Geronimo 1.1 and openejb-core 2.1.1

I have:

Properties p = new Properties();
p.put("java.naming.factory.initial", "org.openejb.client.RemoteInitialContextFactory"); 
p.put("java.naming.provider.url", "127.0.0.1:4201");
p.put("java.naming.security.principal", "system");
p.put("java.naming.security.credentials", "manager");
Context ic = new InitialContext(p);
// every thing seems to be OK...
pw.write(ic.toString());
// ClassCastException in lookup
Object o = ic.lookup("ejb/ModuleFactory");

the beginning of stack trace follows:

java.lang.ClassCastException: java.lang.IllegalArgumentException
        at org.openejb.client.JNDIContext.lookup(JNDIContext.java:266)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at org.xh.dataweaver.web.engine.DispatcherServlet.processRequest(DispatcherServlet.java:98)

is it my fault or is it something in the org.openejb.client.JNDIContext class?

thanks in advance for help
best regards
Lukasz



      ___________________________________________________________ 
Yahoo! Mail is the world's favourite email. Don't settle for less, sign up for
your free account today http://uk.rd.yahoo.com/evt=44106/*http://uk.docs.yahoo.com/mail/winter07.html