Invalid method Hash

Hi,

I'm writing an application which has an RMI-server running on AIX and the client on WinXP. At the moment it is still a very simple app with just 2 remote calls. I am now facing a very wierd problem with those calls. Invoking the first one allways works but second allways throws following exception:

java.rmi.ServerException: RemoteException occurred in server thread; nested exception is:

java.rmi.UnmarshalException: invalid method hash

at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:309)

at sun.rmi.transport.Transport$1.run(Transport.java:163)

at java.security.AccessController.doPrivileged1(Native Method)

at java.security.AccessController.doPrivileged(AccessController.java)

at sun.rmi.transport.Transport.serviceCall(Transport.java)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.handleRequest(TCPTransport.java:834)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:908)

at java.lang.Thread.run(Thread.java:568)

at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)

at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)

at sun.rmi.server.UnicastRef.invoke(Unknown Source)

at com.ing.scfm.calypso.utilities.configcreator.rmi.RMIServer_Stub.doIt(Unknown Source)

at com.ing.scfm.calypso.utilities.configcreator.ConfigCreator.publish(ConfigCreator.java:1078)

I do mean that the call itself fails, the remote method is never actually invoked. I've tried changing the parameters, renaming the method but it keeps giving this error.

So, please help because I'm out of ideas.

Some code that might help:publicvoid doIt()throws RemoteException

{

log.info("Doing it");//never reaches here

}

RMIServer r =new RMIServer();

Naming.rebind("//localhost:1222/ConfigCreator", r);

...

r.doIt();//throw the exception

tx a lot!

Stijn

[2378 byte] By [TheStijna] at [2007-10-2 6:15:47]
# 1
Probably a stub version problem.Take a look at this : http://archives.java.sun.com/cgi-bin/wa?A2=ind0304&L=javaspaces-users&F=&S=&P=3758
antoine.lemoinea at 2007-7-16 13:17:16 > top of Java-index,Core,Core APIs...
# 2
tx,I've looked in my java-installation but I do not even seem to have a 'outrigger-dl.jar'. One thing I did not mention is that I'm executing rmic localy on jdk 1.3.1 and I install the stub/skel on AIX. On both client and server however it's runnig on jdk 1.4.2.
TheStijna at 2007-7-16 13:17:16 > top of Java-index,Core,Core APIs...
# 3
now I've put everything on 1.4.2 but it still gives the same exception
TheStijna at 2007-7-16 13:17:16 > top of Java-index,Core,Core APIs...
# 4
Your stub is out of date with respect to your remote interface and/or remote object.
ejpa at 2007-7-16 13:17:16 > top of Java-index,Core,Core APIs...
# 5
thanks,but how do I solve it?
TheStijna at 2007-7-16 13:17:16 > top of Java-index,Core,Core APIs...
# 6
rmic
ejpa at 2007-7-16 13:17:17 > top of Java-index,Core,Core APIs...
# 7
> rmicand now a little more elaborate ...
TheStijna at 2007-7-16 13:17:17 > top of Java-index,Core,Core APIs...
# 8
recreate the stub files with rmic, register them again and youll be good to go...
takeshi10a at 2007-7-16 13:17:17 > top of Java-index,Core,Core APIs...