2013-12-13 48 views
0

我得到下面這個錯誤:RmiClient SERVERERROR

RmiClient exception: java.rmi.ServerError: Error occurred in server thread; nested exception is: java.lang.AbstractMethodError

如果我按它會與服務器在同一系統上的每個我收到錯誤如下時間來溝通按鈕:

RmiClient exception: java.rmi.ServerError: Error occurred in server thread; nest 
ed exception is: 
     java.lang.AbstractMethodError: ServerGUI.getMessage(Ljava/lang/String;J) 
Ljava/lang/String; 
java.rmi.ServerError: Error occurred in server thread; nested exception is: 
     java.lang.AbstractMethodError: ServerGUI.getMessage(Ljava/lang/String;J) 
Ljava/lang/String; 
     at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source) 
     at sun.rmi.transport.Transport$1.run(Unknown Source) 
     at sun.rmi.transport.Transport$1.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at sun.rmi.transport.Transport.serviceCall(Unknown Source) 
     at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source) 
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Sou 
rce) 
     at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown Sour 
ce) 
     at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
     at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
     at java.lang.Thread.run(Unknown Source) 
     at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknow 
n Source) 
     at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source) 
     at sun.rmi.server.UnicastRef.invoke(Unknown Source) 
     at ServerGUI_Stub.getMessage(Unknown Source) 
     at RmiClient.getMessage(RmiClient.java:13) 
     at ButtonController.actionPerformed(ButtonController.java:15) 
     at javax.swing.AbstractButton.fireActionPerformed(Unknown Source) 
     at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source) 
     at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source) 
     at javax.swing.DefaultButtonModel.setPressed(Unknown Source) 
     at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Sour 
ce) 
     at java.awt.Component.processMouseEvent(Unknown Source) 
     at javax.swing.JComponent.processMouseEvent(Unknown Source) 
     at java.awt.Component.processEvent(Unknown Source) 
     at java.awt.Container.processEvent(Unknown Source) 
     at java.awt.Component.dispatchEventImpl(Unknown Source) 
     at java.awt.Container.dispatchEventImpl(Unknown Source) 
     at java.awt.Component.dispatchEvent(Unknown Source) 
     at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) 
     at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) 
     at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source) 
     at java.awt.Container.dispatchEventImpl(Unknown Source) 
     at java.awt.Window.dispatchEventImpl(Unknown Source) 
     at java.awt.Component.dispatchEvent(Unknown Source) 
     at java.awt.EventQueue.dispatchEventImpl(Unknown Source) 
     at java.awt.EventQueue.access$200(Unknown Source) 
     at java.awt.EventQueue$3.run(Unknown Source) 
     at java.awt.EventQueue$3.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour 
ce) 
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour 
ce) 
     at java.awt.EventQueue$4.run(Unknown Source) 
     at java.awt.EventQueue$4.run(Unknown Source) 
     at java.security.AccessController.doPrivileged(Native Method) 
     at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Sour 
ce) 
     at java.awt.EventQueue.dispatchEvent(Unknown Source) 
     at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
     at java.awt.EventDispatchThread.pumpEvents(Unknown Source) 
     at java.awt.EventDispatchThread.run(Unknown Source) 
+0

這很難提供幫助,因爲你沒有包含任何代碼,甚至沒有包含任何你想要做的描述。我可以告訴你,被調用的方法沒有實現(抽象),但是就我而言,如果沒有更多的信息,我可以得到你。此外,它看起來像你已經發布了兩次相同的巨大堆棧跟蹤 – Floegipoky

+0

@Floegipoky AbstractMethodError沒有什麼神祕的。看到Javadoc。 – EJP

回答

0

通過查看堆棧跟蹤很難分辨出來。但請確保使用Thread擴展服務器類,並在客戶端類中實現以下內容。

EventQueue.invokeLater(new Runnable(){ 
    public void run(){ 
    //////// do something with the client window frame 
    } 
}); 
+0

謝謝你的回答,但我需要一些代碼實現或一些從哪裏可以得到一些例子的網站。由於我是RMI的新手,我想了解更多。 –

+1

您是否嘗試過使用Google?您知道,您可以在Google中輸入兩個單詞,如「rmi示例」。 –

+0

這完全不相關。 – EJP

0

您已經更改了某些內容而無需重新編譯所有內容或重新部署。可能是他遠程方法的簽名。做一個乾淨的生成和重新部署。

相關問題