RMI: UnmarshalException, can't find method after some time.

Hi,
I have a client server application that talks via rmi. My client saves data to a server or gets data by passing in parameters that include string, boolean and a Hashtable. The data is saved and retrieved many times. However, after some time, the RMI can't even find the method. That is, the client calls a method and I get a unmarshalling exception from the client, basically stating that it can't find the method.
Here is the method in my interface, the method in question is the override method, the getLast works fine all the time:
public interface Admin extends Remote
Hashtable getLast(Hashtable setLashtHash) throws RemoteException;
//override method can query or set a new data in the form of a hashtable. It return a Hashtable or null
Object override(boolean setNew, String ticker, boolean getOverrideHash,boolean getLast, boolean getPrevious,Hashtable newOverride) throws RemoteException;
Here's the implementation of override:
synchronized public Object override(boolean setNew, String ticker, boolean getOverrideHash,boolean getLast, boolean getPrevious,Hashtable newOverride) throws RemoteException
try{
if(setNew)
if(newOverride!=null)
System.out.println("Saving override hash, entries=" + newOverride.size());
overrideHash=newOverride;
else if(getOverrideHash)
if(overrideHash!=null)
System.out.println("Getting override hash entries=" + overrideHash.size());
return overrideHash;
else
if(getLast)
if(overrideHash==null)
System.out.println("override hash is null");
return null;
OverrideStruct os=(OverrideStruct)overrideHash.get(ticker);
if(os.last!=null)
System.out.println("Last price for ticker " + ticker + " is=" +os.last);
Float last=os.last;
return last;
return null;
else if(getPrevious)
if(overrideHash==null)
return null;
OverrideStruct os=(OverrideStruct)overrideHash.get(ticker);
if(os.previous!=null)
Float previous=os.previous;
return previous;
return null;
}catch(Exception e)
System.out.println("Unknown Exception caught in override function");
e.printStackTrace();
return null;
Here is the exception, please help. Does anyone know why the exception is "invalid method hash"? I don't understand why it's saying that, I am calling method override(....).
java.rmi.ServerException: RemoteException occurred in server thread; nested exce
ption is:
java.rmi.UnmarshalException: invalid method hash
java.rmi.UnmarshalException: invalid method hash
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 AdminImpl_Stub.override(Unknown Source)
at StocksTable$12.run(stockstable.java:481)
Please help,
Thanks Steve

By the way, this is how my server calls the client:
Hashtable otable=(Hashtable)a1.override(false,new String(""),true,false,false,new Hashtable());

Similar Messages

  • RMI UnmarshalException Occurs after some time

    Hi,
    I have a client server application that talks via rmi. My client saves data to a server or gets data by passing in parameters that include string, boolean and a Hashtable. The data is saved and retrieved many times. However, after some time, the RMI can't even find the method. That is, the client calls a method and I get a unmarshalling exception from the client, basically stating that it can't find the method.
    Here is the method in my interface, the method in question is the override method, the getLast works fine all the time:
    public interface Admin extends Remote
         Hashtable getLast(Hashtable setLashtHash) throws RemoteException;
    //override method can query or set a new data in the form of a hashtable. It return a Hashtable or null
         Object override(boolean setNew, String ticker, boolean getOverrideHash,boolean getLast, boolean getPrevious,Hashtable newOverride) throws RemoteException;
    Here's the implementation of override:
         synchronized public Object override(boolean setNew, String ticker, boolean getOverrideHash,boolean getLast, boolean getPrevious,Hashtable newOverride) throws RemoteException
              try{
              if(setNew)
                   if(newOverride!=null)
                   System.out.println("Saving override hash, entries=" + newOverride.size());
                   overrideHash=newOverride;
              else if(getOverrideHash)
                   if(overrideHash!=null)
                   System.out.println("Getting override hash entries=" + overrideHash.size());
                   return overrideHash;
              else
                   if(getLast)
                        if(overrideHash==null)
                             System.out.println("override hash is null");
                             return null;
                        OverrideStruct os=(OverrideStruct)overrideHash.get(ticker);
                        if(os.last!=null)
                             System.out.println("Last price for ticker " + ticker + " is=" +os.last);
                             Float last=os.last;
                             return last;
                        return null;
                   else if(getPrevious)
                        if(overrideHash==null)
                             return null;
                        OverrideStruct os=(OverrideStruct)overrideHash.get(ticker);
                        if(os.previous!=null)
                             Float previous=os.previous;
                             return previous;
                        return null;
         }catch(Exception e)
              System.out.println("Unknown Exception caught in override function");
              e.printStackTrace();
              return null;
    Here is the exception, please help.
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.UnmarshalException: invalid method hash
    java.rmi.UnmarshalException: invalid method hash
    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 AdminImpl_Stub.override(Unknown Source)
    at StocksTable$12.run(stockstable.java:481)
    Please help,
    Thanks Steve

    By the way, this is how my server calls the client:
    Hashtable otable=(Hashtable)a1.override(false,new String(""),true,false,false,new Hashtable());

  • Java.rmi.UnmarshalException after some time without a process restart.

    Hello,
    I am having a problem when I use RMI connection. I run a process which creates its own RMI registry and binds to it in the following way:
        private void registerRmi() throws Exception {
            // Register an instance of RunServices with the
            // RMI Naming service
            // Install a security manager that can handle remote stubs
            System.setSecurityManager(new RMISecurityManager());
            String serviceName = IScannerRmiCommands.RMI_NAME;
            log.infoF("General.Info.RegisteringRMIService", serviceName);
            try {
                if (s_registry == null) {
                    s_registry = LocateRegistry.createRegistry(IScannerRmiCommands.RMI_PORT);
                s_registry.rebind(serviceName, this);
                s_registredRmi = true;
                log.infoF("General.Info.RMIServiceRegistered");
            } catch (RemoteException e) {
                log.fatalF(e, "General.Fatal.RMIServiceRegistrationFailed");
        }The client applications are able to connect to this process, but after some time clients start to receive the following exceptions:
    java.rmi.UnmarshalException: error unmarshalling return; nested exception is:
         java.io.EOFException
         at sun.rmi.registry.RegistryImpl_Stub.lookup(Unknown Source)
         at java.rmi.Naming.lookup(Unknown Source)
         at com.x1.util.RMIHelper.doLookup(RMIHelper.java:23)
         at com.x1.util.RMIHelper.lookup(RMIHelper.java:83)
         at com.x1.setup.admin.Administration.lookupRemoteScanner(Administration.java:123)
         at com.x1.infrastructure.statistics.StatisticResponseHandler.createMPResponse(StatisticsProvider.java:1337)
         at com.x1.infrastructure.statistics.StatisticResponseHandler.run(StatisticsProvider.java:157)
         at java.lang.Thread.run(Unknown Source)
    Caused by: java.io.EOFException
         at java.io.ObjectInputStream$BlockDataInputStream.peekByte(Unknown Source)
         at java.io.ObjectInputStream.readObject0(Unknown Source)
         at java.io.ObjectInputStream.readObject(Unknown Source)
         ... 8 moreI can't reproduce this on my dev environment but a customer experiences this quite often. They don't have any firewall running or antivirus software on these machines.
    Any help will be highly appreciated.
    Thanks in advance.
    Edited by: rossenv on Oct 2, 2009 2:18 PM

    No, I don't see any errors at server's site and this is the most strange thing. It seems that server operates normally except it stopped execute RMI commands until it is restarted. After that it responds properly and after some time stops again with the same client exception.

  • My iPhone 4 can not find network after updating to 7.0.6

    my iPhone 4 can`t find network after updating to 7.0.6. i`ve reinstalled system, but nothing`s really changed.

    iPhone 4S: I have the same problem. After updating to iOS 7, wifi worked for some time, and then it stopped working. I can't even enable wifi. I just updated to iOS 7.0.2 and it didn't help at all.

  • How can i Delete all foto from my iphone and after some time get them one more time on it but not as a new album :)?

    How can i Delete all foto from my iphone and after some time get them one more time on it but not as a new album, i want them in the camera roll ?

    How can I delete EVERY THING off my Mac and have it like new?
    Boot from the software install DVD and do an "erase and install" when prompted.

  • Mx.services.WebService() fails with Can't Find Method in Service

    When I test in debug mode, my webservices fail with can't
    find method or can't find URL. When I test on the very same
    webservice with the SWF file embedded in an HTML file, it all works
    fine!
    This all worked before I updated to Windows Vista last week!
    Any ideas? How can I troubleshoot this?? (I'm using a
    mx.services.Log when running in Debug)
    TIA,
    geo

    Some further info from the trace log:
    Error opening URL "
    http://desktop.mydomain.local/MyCompany/WebServices/MyServices.asmx"
    ObligationMet.Fault: undefined, Unable to connect to
    endpoint:
    http://desktop.mydomain.local/odoclub/WebServices/MyServices.asmx

  • I update my iPhone in iTunes, and after some time, opened a window saying "rosolvendor conflict" and asking me to choose, giving me two options, showing the name of a friend who also has an iPhone. Can anyone help me?

    I update my iPhone in iTunes, and after some time, opened a window saying "rosolvendor conflict" and asking me to choose, giving me two options, showing the name of a friend who also has an iPhone.
    Can anyone help me?

    Dear Tim,
    I saw your message. Below are the problems:
    Whenever I connect my iphone 3GS to my PC through a USB. My itunes software comes up automatically.
    1. After that a message appears from the itunes that states that 'itunes could not connect to the itunes store, an unknown error cccured (306).
    2. After the above, an alert message comes up which states that A new iphone software version 5.1 is availlable for my iphone. It then states would you like to download it and update your iphone now? With the options buttons as Cancel or Download and Update or Download Only. Whenever I clicked on Download and Update or Download Only, the next message that comes up is that The iphone Software Update Server Could not be Contacted and suggest make sure your network setting are correct and active or try again later.
    The above is the challenges I am facing now.

  • I can't find iSync after lion install

    I can't find iSync after lion install. I try too sync with my N8 Nokia. The program iSync dont appear in program mapp.

    It's Apple's software not yours and as shown by it's exclusion on the OS X Lion pages is not part of the new OS. Upgrading to Lion is optional.
    It's a trivial matter to copy it back from your Snow Leopard backup, but using it under Lion is not supported at all and WILL stop working sooner or later.
    Why would it be sensible for Apple to include software in their new OS that they know will stop working?

  • I purchased Fifa13 from the App Store, downloaded it in my pc..,but whrn i am trying to install it in my iad frpm the pc, i couldnt do it. The installation process stops after some time and the ipad shows some thing like "can sync..,failed to install fifa

    I purchased Fifa13 from the App Store, downloaded it in my pc..,but when i am trying to install it in my ipad frpm the pc, i couldnt do it. The installation process stops after some time and the ipad shows some thing like "can sync..,failed to install fifa13"
    What can i do?
    btw....,its happeniing only wth the fifa13,     installed other apps from pc previously.

    anybody answer me fast

  • IPhone 6 screen freezes and can't find wifi after iOS 8.0.2 update

    iPhone 6 screen freezes and can't find wifi after iOS 8.0.2 update. Have to do a hard reboot. I am Extremely disappointed and lost ALL trust in Apples Quality Assurance. From now on I'll wait a week before I update.

    Hey there Shortos,
    It sounds like your phone touchscreen is not consistently working for you after updating to iOS 8. I can see how that would be pretty frustrating. It sounds to me like this could be a software issue or an issue with the screen itself. I would start with the troubleshooting in the following article to help troubleshoot the screen itself:
    iPhone, iPad, iPod touch: Troubleshooting touchscreen response
    Restart your device
    Hold the On/Off button until "slide to power off" appears. Slide to power off your device. When it is off, press the On/Off button to turn it back on.
    If you can't restart your device, reset it by pressing and holding the Sleep/Wake button and the Home button at the same time for a least ten seconds, until the Apple logo appears.
    Clean the screen with a soft, slightly damp, lint-free cloth.
    Avoid using the device while wearing gloves, with wet hands, or immediately after applying hand lotion.
    If you have a protective case, or if you are using a plastic sheet or film on the display, try removing them and testing the device without it.
    If that does not resolve the issue, I would next quit all the running apps on the device:
    iOS: Force an app to close
    Double-click the Home button.
    Swipe left or right until you have located the app you wish to close.
    Swipe the app up to close it.
    When you have done that restart the device and test the issue again:
    iOS: Turning off and on (restarting) and resetting
    Thank you for using Apple Support Communities.
    All the very best,
    Sterling

  • After downloading ios 8 on my i pad air 16 GB, my i pad keeps on restarting on its own after some time?  any idea how can it be rectified?

    after downloading ios 8 on my i pad air 16 GB, my i pad keeps on restarting on its own after some time?  any idea how can it be rectified?

    Please tell me that it has NEVER been jailbroke.  If it has not been jailbroke, here are some standard repair procedures:
    First, try a system reset.  It cures many ills and it's quick, easy and harmless...
    Hold down the on/off switch and the Home button simultaneously until you see the Apple logo.  Ignore the "Slide to power off" text if it appears.  You will not lose any apps, data, music, movies, settings, etc.
    If the Reset doesn't work, try a Restore.  Note that it's nowhere near as quick as a Reset.  It could take well over an hour!  Connect via cable to the computer that you use for sync.  From iTunes, select the iPad/iPod and then select the Summary tab.  Follow the on-screen directions for Restore and be sure to say "yes" to the backup.  You will be warned that all data (apps, music, movies, etc.) will be erased but, as the Restore finishes, you will be asked if you wish the contents of the backup to be copied to the iPad/iPod.  Again, say "yes."
    At the end of the basic Restore, you will be asked if you wish to sync the iPad/iPod.  As before, say "yes."  Note that that sync selection will disappear and the Restore will end if you do not respond within a reasonable time.  If that happens, only the apps that are part of the IOS will appear on your device.  Corrective action is simple -  choose manual "Sync" from the bottom right of iTunes.
    If you're unable to do the Restore (or it doesn't help), go into Recovery Mode per the instructions here.  You WILL lose all of your data (game scores, etc,) but, for the most part, you can redownload apps and music without being charged again.  Also, read this.

  • Error! Check Activation and Can't Delete Authorization, getting "Please try after some time"

    Hello,
    I am getting "Error! Check Activation" error message when I try to download epub from acsm file. I found that I should erase and re-authorize. When I try to erase authorization I get, "Please try after some time."
    I need a solution.
    Thanks.

    try this
    I can't de authorize my computer. It just keeps saying to try again later.

  • My ISP requires a http login. I can use the iPad fine if I am logged in on a PC connected to the same wifi network, but if I login on safari on my ipad, the connection drops after some time.. any workaround?

    My ISP requires a http login. I can use the iPad fine if I am logged in on a PC connected to the same wifi network, but if I login on safari on my ipad, the connection drops after some time.. any workaround?

    TJBUSMC1973 wrote:
    The iPhone is working, as designed and advertised.  In this case, the user failed to educate themselves properly, either by proper research or asking the right questions, before purchasing the device.
    I understand that the OP failed to do research. But then, I wasn't replying to the OP. I was replying to Chris. I have Verizon. I can talk and use data at the same time with my Droid Maxx. Therefore, the problem is not just with the network. It would be technically possible for an iPhone to do that on Verizon/Sprint if Apple had chosen to use a different chip, such as the kind other phone manufacturers have elected to use.
    Of course, this is probably all irrelevant to the OP's issue. It was merely a point of clarification, especially for those people who are used to being able to use both voice and data at the same time on Verizon. When they switch to an iPhone, they are often surprized at the limitation.
    Best of luck.

  • Hi, since I've bought the iphone, my facetime never works, I just can't activate the facetime in settings, when I put it on, after some time, the phone shows the message: activation unsuccesful. Do you guys know what should I do?

    Hi, since I've bought the iphone, my facetime never works, I just can't activate the facetime in settings, when I put it on, after some time, the phone shows the message: activation unsuccesful. Do you guys know what should I do?

    Where are you, what network are you on and where did you get the phone?
    If you are on an unsupported network, Facetime may never be able to activate. If the phone originated in a different country, facetime is probably trying to send an International text message to activate. If you don't have International text messaging, it will fail.

  • AirPrint - iPhone 5 can not find printer after router change

    AirPrint - iPhone 5 can not find printer after router change; however router is exact replacement of previous one (Zyxel, issued by Imagine wireless). AirPrint was working previously. Printer is on same network. Wireless printing working fine. Have tried rebooting prtiner, phone and router. Any suggestions?

    I'd look to HP for support.
    Here's an HP Airprint-related trouble-shooting page:  http://h10025.www1.hp.com/ewfrf/wc/document?docname=c03314085&tmp_task=solveCate gory&cc=us&dlc=en&jumpid=reg_r1002_usen_c-001_title_r0001&lc=en&product=5271613
    Lots more info on the HP support site.

Maybe you are looking for