请教一个错误的原因。
我在ejb开发时,测试程序中如下语句执行后,
Orders PKorderKey=(OrdersPK)PortableRemoteObject.narrow(objRef,OrdersPK.class);
(其中,OrdersPK为我的一个类,并已经import.)
报错:
java.lang.ClassCastException
at com.sun.corba.se.internal.javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:296)
at javax.rmi.PortableRemoteObject.narrow(PortableRemoteObject.java:137)
at com.rainight.eshop.customer.CustomerTestClient1.main(CustomerTestClient1.java:275)
请问是什么原因,如何解决?