2013-02-25 72 views
0

我收到此錯誤,並嘗試了所有可能的操作,但無法解決問題,請幫助解決此問題。Eclipse中的Java RMI問題

我正在使用Eclipse indigo IDE。

開始rmiregistrycmd

Exception: 
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: RMISIntf 
    java.rmi.ServerException: RemoteException occurred in server thread; nested exception is: 
    java.rmi.UnmarshalException: error unmarshalling arguments; nested exception is: 
    java.lang.ClassNotFoundException: RMISIntf 
    at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:419) 

...................

回答

0

註冊表沒有在ClassNotFoundException其CLASSPATH命名的類。最簡單的解決方案和其他幾個RMI問題是在服務器JVM中啓動註冊表,LocateRegistry.createRegistry().

+0

感謝您的回覆。但它仍然給我同樣的錯誤。我的服務器和客戶端都在同一臺機器上。我使用的是Eclipse IDE。請幫我解決問題 – user2082252 2013-02-26 05:59:54

+0

@ user2082252如果你通過'LocateRegistry.createRegistry()'啓動註冊表,它是否真的向你拋出一個'ServerException'封裝了'bind()/ rebind()'方法的'ClassNotFoundException'? – EJP 2013-02-26 09:58:32

+0

是的,我得到了同樣的例外 – user2082252 2013-02-28 08:13:18