So I have a session bean, Home interface, Remote interface, Bean
class, the works. When I invoke it from a web application within
Orion, it works fine. When I try to invoke it from a standalone
client, I can look up the home interface but I can't narrow it.
I get:

  java.lang.ClassCastException
    at 
com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
    at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
  ...[etc.]

Now, it's pretty clear to me that I'm missing something on the
client side, because if after

  Object ref = jndiContext.lookup("ejb/Foo");

I add

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

on the web-app side, the working side, I get 

  FooHome_StatelessSessionHomeWrapper37

but on the standalone client side I only get

  __Proxy0

whatever that is.

Do I need to be generating the client-side stub classes somehow
and including them with the standalone client? How do I do that?
I find references in the Orion documentation to something called
an "EJB client JAR" but nothing on how to create one or what's
supposed to go in it.

I've seen two or three questions on this sort of ClassCastException
in the archive for this mailing list but haven't been able to find
answers to any of them. Has anyone got an answer?



Reply via email to