求助:rmi.UnmarshalException:error unmarshalling return;
这是错误:
java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
java.lang.ClassNotFoundException: ManagementSystem.ManagementSystem (no security manager: RMI class loader disabled)
at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
at java.rmi.Naming.lookup(Naming.java:84)
at TestClient.main(TestClient.java:9)
Caused by: java.lang.ClassNotFoundException: ManagementSystem.ManagementSystem (no security manager: RMI class loader disabled)
at sun.rmi.server.LoaderHandler.loadProxyClass(LoaderHandler.java:535)
at java.rmi.server.RMIClassLoader$2.loadProxyClass(RMIClassLoader.java:628)
at java.rmi.server.RMIClassLoader.loadProxyClass(RMIClassLoader.java:294)
at sun.rmi.server.MarshalInputStream.resolveProxyClass(MarshalInputStream.java:238)
at java.io.ObjectInputStream.readProxyDesc(ObjectInputStream.java:1531)
at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1493)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1732)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
... 3 more
这是代码部分:
public class MSserver {
public static void main(String[] args) {
try {
LocateRegistry.createRegistry(1099);
ManagementSystem MS=new ManagementSystemImpl();
Naming.rebind("rmi://localhost:1099/ManagementSystem",MS);
System.out.println("MSserver start!");
} catch (Exception e) {
e.printStackTrace();
}
}
}
public class TestClient {
public static void main(String[] args) {
try {
ManagementSystem MS=(ManagementSystem) Naming.lookup("rmi://localhost/ManagementSystem");
GroupPurchaseManagementSystem GPMS=MS.getMS();
} catch (Exception e) {
e.printStackTrace();
}
}
}
谁懂得帮个忙,很着急的。。。。
[解决办法]
我 也是这个错误 阿 要是解决了 说一声阿
[解决办法]
问题解决了吗?
[解决办法]
你问他解决了!说说是怎么回事啊!