调用EJB的问题
调用EJB代码如下:
SaveUserSession ejbUser = null;
Properties p = new Properties();
p.put(Context.INITIAL_CONTEXT_FACTORY,
"weblogic.jndi.WLInitialContextFactory");
p.put(Context.PROVIDER_URL,"t3://localhost:7001");
Context ctx = new InitialContext(p);
Object obj = ctx.lookup("SaveUserSession");
SaveUserSessionHome home=(SaveUserSessionHome)PortableRemoteObject.narrow(obj,
SaveUserSessionHome.class);
ejbUser = (SaveUserSession)home.create();
出现错误:
java.lang.ClassCastException: epgv2.SaveUserSessionEOImpl_WLStub
什么原因,另外这个epgv2.SaveUserSessionEOImpl_WLStub是什么类啊?