Hi,

i have deployed some Beans with JBoss pre 2.1 binary and now I am trying
to connect with a client application. The client code looks like the
examples from the JBoss website:

InitialContext jndiContext = new InitialContext();
Object ref  = jndiContext.lookup("Login");
LoginHome home = (LoginHome)PortableRemoteObject.narrow (ref,
LoginHome.class);

But the third line leads to a ClassCastException for LoginHome. A
System.out.println for ref shows me "LoginHome", so the JNDI lookup
succeeded. The superclass for ref is java.lang.reflect.Proxy, so I tried
to find out which Interfaces this dynamic Proxy is implementing. It
implements LoginHome and javax.ejb.Handle.
Now I can cast ref to Handle but I can't cast ref to LoginHome. That's
very strange...

My client classpath contains jboss-client.jar and ejb.jar.
I have no idea what could be wrong.


Tobias

_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to