Hi everyone,
I have this problem when I try to get the home interface of the EJB,
using a servlet to access EJBs from another application on the same
server. When I call the PortableRemoteObject.narrow(..) method, it
throws the exception:
java.lang.ClassCastException: StampHome_EntityHomeWrapper1
Below is what I have in my code...
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.evermind.server.rmi.RMIInitialContextFactory");
env.put(Context.PROVIDER_URL,"ormi://p500.cheapdull.mine.nu/stamp");
env.put(Context.SECURITY_PRINCIPAL,"admin");
env.put(Context.SECURITY_CREDENTIALS,"123");
context = new InitialContext(env);
....
Object boundObject = context.lookup("Stamp");
stamph = (stamp.ejb.StampHome)
PortableRemoteObject.narrow(boundObject, stamp.ejb.StampHome.class);
I tried to print the class name of 'boundObject' out, and it is
stamp.ejb.StampHome (the correct home interface).
I have search through the past posts in this mailing list, and read
that some people said it is a bug in orion...is it true? or did I do
something silly there?
Any suggestion much appreciated.
Regards, James.