Problem with lost of the access to the RMI server

Hi to all.
We have two applications. First one (master) provides to second (slave) through RMI service their data or other resources.
In the ordinary way all works fine. But if we need for some reason restart master application, slave can't access to the RMI service and calling of the method Naming.lookup(...) throws java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.EOFException
Interestingly, calling of method Namig.list(...) at this moment correctly returns an array of the names bound in the registry.
For completeness, in the time of restarting master application, classes of the RMI services are not changed and thus Stub/Skeleton classes are same on both sides.
What is reason for this behaviour? It is way to restart/restore RMI access of the slave application to the master without restarting server (Tomcat) of both applications?
Thank, Roman

Thank for your reply, but your suggestion not helped me now.
For registering and binding I used usual practices. Following snippets of code are inside method that perform initialization on application startup. I was trying three versions.
First version creates registry and binds service classes only. Without any checks.
try {
  LocateRegistry.createRegistry(rmiPort);
  String ip = Functions.getCurrentEnvironmentNetworkIp();
  if (ip.startsWith("?"))
    throw new Exception("Can't retrieve application IP address.");
  logger.info("Application IP address: " + ip);+
  RMIServiceCommonImpl rmiServiceCommon = new RMIServiceCommonImpl();
  String name = "rmi://" + ip + ":" + rmiPort + "/";
  Naming.rebind(name + IRMIServiceCommon.RMI_SERVICE_COMMON_NAME, rmiServiceCommon);
catch (Exception e) {
  logger.error("Failed to register RMI services: ", e);
}On first application start all is OK and client has no problem to access RMI service.
But if master application is restarted, calling of the method LocateRegistry.createRegistry(rmiPort); throws
java.rmi.server.ExportException: internal error: ObjID already in use
Since that, client can't access to the RMI service and following code (method Naming.lookup) throws
java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.EOFException
  String name = "rmi://" + ConfigServlet.getProperty("rmiHostUrl") + "/";
  IRMIServiceCommon service = (IRMIServiceCommon) Naming.lookup(name + IRMIServiceCommon.RMI_SERVICE_COMMON_NAME);Second version checks if registry exist and trying to get list of registered services. If services not exist Register is created.
try {
  Registry reg = LocateRegistry.getRegistry(rmiPort);
  String[] list = null;
  try {
    list = reg.list();
  catch (Exception ex) {
    // ignore
  if (list == null || list.length == 0)
    LocateRegistry.createRegistry(rmiPort);
  String ip = Functions.getCurrentEnvironmentNetworkIp();
  if (ip.startsWith("?"))
    throw new Exception("Can't retrieve application IP address.");
  logger.info("Application IP address: " + ip);
  String name = "rmi://" + ip + ":" + rmiPort + "/";
  RMIServiceCommonImpl rmiServiceCommon = new RMIServiceCommonImpl();
  Naming.rebind(name + IRMIServiceCommon.RMI_SERVICE_COMMON_NAME, rmiServiceCommon);
catch (Exception e) {
  logger.error("Failed to registering RMI services: ", e);
}Again, first start is OK.
In this case, after application restart, calling of method Naming.rebind() throws
java.lang.IllegalStateException at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1272)
INFO: Illegal access: this web application instance has been stopped already. Could not load eu.arachne.rmi.RMIServiceCommonImpl_Stub.
This exception is followed by similar exceptions, but differs in class names (stubs) - java.rmi.server.RemoteStub, java.rmi.server.RemoteObject, java.rmi.dgc.Lease, java.rmi.dgc.VMID, java.rmi.server.UID
Of course, client application can't access to the service.
The third version first unbinds all services and then performs binding again.
if (list == null || list.length == 0)
  LocateRegistry.createRegistry(rmiPort);
else {
  for (int ii = 0; ii < list.length; ii++)
    Naming.unbind(name + list[ii]);
}But again, rebinding fail as I mentioning above.
I don't know... :-( How I can solve this problem?
Thank, Roman

Similar Messages

  • Solving the problem with error 80003 cannot access bb ID update server

    Must be done over wi-fi only, switch off the cellphone network, works without  a problem for me, hope it will work for everybody

    Hi Guys,
    Oops! by the look of things we all have the same problem, it seems as if BB is frustrating a lot lately. I updated my app world this morning and when i rebooted, and can't access my app world. Its giving me the same error code 80003).

  • Hi i have a problem with my iphone 3gs. i updated the software to ios 6 but now when trying to activate the phone it comes up with a message saying that the activation server is currently unavailable, also it always says no sim! what can i do?

    i have an activation problem with my iphone 3gs. i updated the software to io6 using itunes but now the phone will not complete activation because it keeps saydin the activation server is not available and to re try later. ive been trying for 6 hours but it still wont activate. if i try using itunes then it sayd no sim inserted when there is one inserted, what can i do?

    You are right, but how could i send it to Apple? when the phone company first replaced my iphone they had in stock alots of iphones and they just sent mine back to Apple and gave me a new one, so all i did is to give them my phone, but now how could i sent it to Apple? and i cant send it by myself, and the store wont do that, its a lost for them.. so sending it to Apple wasnt an option from the begining.
    and for the record, i dont think the store where i bought it is an authorized shop.. its just a store who boughts phone's from Apple in a low price and sells it in much more money..

  • Lost the access to the first partion  of the firewire drive and the data ?

    Hello to everybody,
    after i moved 5,5GB Data from my internal harddisk, HFS+ , to my external Firewire drive, FAT 32 formatted for compatilibilty with a PC, i lost the access to the first partion of the firewire drive and the data. At first after having appearently finished copying the data a lot of ununderstable numbers and letters appeared on the first partion and couldn't be opened.
    Using first aid showed the following messages:
    1.
    volume „disk2s5“ testing
    ** /dev/disk2s5
    ** Phase 1 - Read FAT
    ** Phase 2 - Check Cluster Chains
    ** Phase 3 - Checking Directories
    Root directory doesn't start a cluster chain
    Error: the basic (????? ) process shows an error by finishing (-9972)
    German original message:
    Fehler: Der zugrundeliegende Prozess meldete einen Fehler beim Beenden. (-9972)
    2.
    volume „disk2s5“ testing
    ** /dev/disk2s5
    ** Phase 1 - Read FAT
    ** Phase 2 - Check Cluster Chains
    ** Phase 3 - Checking Directories
    Root directory doesn't start a cluster chain
    Error: the basic (????? ) process shows an error by finishing (-9972)
    German original message:
    Fehler: Der zugrundeliegende Prozess meldete einen Fehler beim Beenden. (-9972)
    Volume „FIRE2“ testing
    ** /dev/disk2s6
    ** Phase 1 - Read FAT
    ** Phase 2 - Check Cluster Chains
    ** Phase 3 - Checking Directories
    ** Phase 4 - Checking for Lost Files
    16 files, 726592 free (1880420 clusters)
    Volume „FIRE 3“ testing
    Mounting Disk** /dev/disk2s7
    ** Phase 1 - Read FAT
    ** Phase 2 - Check Cluster Chains
    ** Phase 3 - Checking Directories
    ** Phase 4 - Checking for Lost Files
    149 files, 2866032 free (441271 clusters)
    Volume „FIRE 4“ testing
    Mounting Disk** /dev/disk2s8
    ** Phase 1 - Read FAT
    ** Phase 2 - Check Cluster Chains
    ** Phase 3 - Checking Directories
    ** Phase 4 - Checking for Lost Files
    2755 files, 1396016 free (873683 clusters)
    3 Volumes tested
    0 HFS-Volumes tested
    2 Volumes with an other type than HFS tested
    1 Volume couldn't be tested
    1 Volume wasn't tested
    3.
    First Aid interrupted the testing of "disk2s5" because the the following error has appeared:
    the basic (????? ) process shows an error by finishing
    German orignal message:
    Das Festplatten-Dienstprogramm hat überprüfen „disk2s5“ unterbrochen, da der folgende Fehler aufgetreten ist:
    Der zugrundeliegende Prozess meldete einen Fehler beim Beenden.
    As i translated the First Aid messages from german to english they will probably look a bit different in english but i hope you get the idea.
    So what can i do to regain access to the first partion and the data ?
    If i have to use the terminal then please !!! step by step as i don't have any experience in using it
    Greetings and thanks in advance for any hints
    Lutz
    PD: i was just arranging my data into different categories so could later burn a backup when this happened
    g4 AGP 400 MHz   Mac OS X (10.3.9)   768 MB SDRAM

    Yep, you sure can. That's how I support my family's computers. I just entered their dynamic hostname in ARD, and it always updates their IP address in the ARD list should they have changed.

  • I m having problems with my iPad 2 gestures.  The  screen enlarges and  will not respond to my attempts to restore it.

    I m having problems with my iPad 2 gestures.  The  screen enlarges and  will not respond to my attempts to restore it.   Is anyone else having this problem?  What is causing it and what  helps to restore normalcy?

    Try double-tapping the screen with 3 fingers and see if that zooms it back out - and if it does set Settings > General > Accessibility > Zoom 'off'. If it doesn't zoom you back then try triple-clicking the home button and see if that turns it off, and if it does you can then change what a triple-click does via Settings > General > Accessibility > Triple-Click Home.

  • Since I upgraded to 10.7.2 lion I have these problems with Time Capsule. What is the problem? thanks

    since I upgraded to 10.7.2 lion I have these problems with Time Capsule. What is the problem? thanks

    Unable to access disk image backup "/ Volumes / Time Capsule / iMac Admin. Sparsebundle" (error -1).
    Then?????

  • TS1398 I have problems with my wifi connection after update the ios6 any advice

    I have problems with my wifi connection after update the ios6 any advice

    iOS 6 Wifi Problems/Fixes
    Fix For iOS 6 WiFi Problems?
    http://tabletcrunch.com/2012/09/27/fix-ios-6-wifi-problems/
    Did iOS 6 Screw Your Wi-Fi? Here’s How to Fix It
    http://gizmodo.com/5944761/does-ios-6-have-a-wi+fi-bug
    How To Fix Wi-Fi Connectivity Issue After Upgrading To iOS 6
    http://www.iphonehacks.com/2012/09/fix-wi-fi-connectivity-issue-after-upgrading- to-ios-6.html
    iOS 6 iPad 3 wi-fi "connection fix" for netgear router
    http://www.youtube.com/watch?v=XsWS4ha-dn0
    Apple's iOS 6 Wi-Fi problems
    http://www.zdnet.com/apples-ios-6-wi-fi-problems-linger-on-7000004799/
    ~~~~~~~~~~~~~~~~~~~~~~~
    Look at iOS Troubleshooting Wi-Fi networks and connections  http://support.apple.com/kb/TS1398
    iPad: Issues connecting to Wi-Fi networks  http://support.apple.com/kb/ts3304
    WiFi Connecting/Troubleshooting
    http://www.apple.com/support/ipad/wifi/
    iOS: Recommended settings for Wi-Fi routers and access points  http://support.apple.com/kb/HT4199
    Additional things to try.
    Try this first. Turn Off your iPad. Then turn Off (disconnect power cord for 30 seconds or longer) the wireless router & then back On. Now boot your iPad. Hopefully it will see the WiFi.
    Go to Settings>Wi-Fi and turn Off. Then while at Settings>Wi-Fi, turn back On and chose a Network.
    Change the channel on your wireless router (Auto or Channel 6 is best). Instructions at http://macintoshhowto.com/advanced/how-to-get-a-good-range-on-your-wireless-netw ork.html
    Another thing to try - Go into your router security settings and change from WEP to WPA with AES.
    How to Quickly Fix iPad 3 Wi-Fi Reception Problems
    http://osxdaily.com/2012/03/21/fix-new-ipad-3-wi-fi-reception-problems/
    If none of the above suggestions work, look at this link.
    iPad Wi-Fi Problems: Comprehensive List of Fixes
    http://appletoolbox.com/2010/04/ipad-wi-fi-problems-comprehensive-list-of-fixes/
    Fix iPad Wifi Connection and Signal Issues  http://www.youtube.com/watch?v=uwWtIG5jUxE
    Fix Slow WiFi Issue https://discussions.apple.com/thread/2398063?start=60&tstart=0
    Unable to Connect After iOS Update - saw this solution on another post.
    https://discussions.apple.com/thread/4010130
    Note - When troubleshooting wifi connection problems, don't hold your iPad by hand. There have been a few reports that holding the iPad by hand, seems to attenuate the wifi signal.
    ~~~~~~~~~~~~~~~
    If any of the above solutions work, please post back what solved your problem. It will help others with the same problem.
     Cheers, Tom

  • Have a  problem with Lightroom 5.4.  Since the program crashed yesterday it won't launch, it comes up with the message "Lightroom encountered an error when reading its preview cache and needs to quit".  "  Lightroom will attempt to fix this problem net ti

    Have a  problem with Lightroom 5.4.  Since the program crashed yesterday it won't launch, it comes up with the message "Lightroom encountered an error when reading its preview cache and needs to quit".  "  Lightroom will attempt to fix this problem next time it launches".  Except that it doesn't, I keep getting the same message and the program closes.  Does anyone know what I  can do to repair it?  Can't back up, can't do anything.

    There are dozens of threads in this forum that describe the fix

  • HT1871 Hello i have one IPhone 4S and I use 3G net in my mobile sometime I have problem with temperature in my phone at the SIM card or battery how can I fix this problem. By update or version of 6.1.3

    Hello i have one IPhone 4S and I use 3G net in my mobile sometime I have problem with temperature in my phone at the SIM card or battery how can I fix this problem. By update or version of 6.1.3

    Could it be because the SIM card got damaged while I cut it to fit the IPhone?
    Very likely. Hard to believe the carrier in Mexico doesn't have a micro-SIM card available.
    Or somehow the Chinese carrier found out and locked it?
    No, which is not possible.
    What can I do? Get a new SIM and see if it works again?
    Get a micro-SIM from the carrier in Mexico that you don't have to manually cut down. If that carrier doesn't provide one, switch to another carrier that is not so low-budget.

  • I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    I have problem with buying in games , I got the massage that the purchased can not be completed , please contact iTunes support.. I need help for my case please

    http://www.apple.com/support/itunes/contact/

  • Ive downloaded some apps onto my pc yet only 1 has synced to my ipad, it says something about theres a problem with my billing, yet I purchased the 1 app I got for $20, but 1 free app and another paid, wont sync, i di have money in my account

    Ive downloaded some apps onto my pc yet only 1 has synced to my ipad, it says something about theres a problem with my billing, yet I purchased the 1 app I got for $20, but 1 free app and another paid, wont sync, i di have money in my account

    Right click on your iPad's name in the iTunes app on your computer and choose to transfer purchases. That should transfer anything that you have bought with the App Store app on the iPad to the iTunes app on your computer.

  • I have a problem with my iPhone 5 stopped working the sleep / power and simultaneously refused to obey the HOME button. I can not use either one or the other. I can not enable or disable the device, display lights up when you plug the charger. same displa

    I have a problem with my iPhone 5 stopped working the sleep / power and simultaneously refused to obey the HOME button. I can not use either one or the other. I can not enable or disable the device, display lights up when you plug the charger. same display works fine as it is surprising. or maybe someone knows what is the reason for this? is there any way to solve this problem?

    More than likely its a hardware issue, I have never encountered such a problem and best bet is to just go get it replaced. If you have insurance on your device apple will replace it as long as there was no water damage, if you dont have insurance they will charge $200 more or less. Hope you get it fixed

  • TS1702 I had this Scrabble on my iPad2 and began to have connection problems, it would lock in the "connecting" position. This is not the first time Scrabble has had problems with interface. Typically customers delete the Ap then download it again to rein

    I have contacted EA about this and can find no help. I had this Scrabble on my iPad2 and began to have connection problems, it would lock in the "connecting" position. This is not the first time Scrabble has had problems with interface. Typically customers delete the Ap then download it again to reinstall it. During the process you sign in and approve the purchase KNOWING that another window will open saying that you have previously purchased it and that there is no charge. So what happened this time? It will not connect and all of my saved and current games are wiped out. I want my money back, this game interface is pretty junk and operates like some ancient DOS program,,bug,bug,buggy. I want my money back.

    Go here:
    http://www.apple.com/support/itunes/contact/
    and follow the instructions to report the issue to the iTunes Store.
    Regards.

  • I bought a new MacBook Pro several months ago.  I keep losing my wireless connection (my wife, sitting several feet from me has no problem with her iPad2).  I find the quickest fix ix to turn Airport off and back on.  Very annoying.   Suggestions please?

    I bought a new MacBook Pro several months ago.  I keep losing my wireless connection (my wife, sitting several feet from me has no problem with her iPad2).  I find the quickest fix ix to turn Airport off and back on.  Very annoying.   Suggestions please?

    What kind of wireless router are you using? more importantly which protocol are you connecting with? Are you and wife connecting using the 2.4Ghz band? or do you have a dual band router that offers the 5GHZ band?  Are you both connecting vie 802.11 a/b/g or n?
    The best thing to do is to go into SYSTEM PREFERENCES and select NETWORK, then select AIRPORT and click on the ADVANCED button.
    Under the AirPort tab you should delete all the preferred networks and only add back in your network with the proper security settings and passwords.
    If you hold down the option key on your keyboard while clicking on the airport icon at the top on your macbook pro. you'll seesome data that will tell you what band and mode you're connecting at, as well as in an indication of signal strength (RSSI) if you write down and post back that information it'll tell us what's going on.

  • I have a problem with my PC mobile device that the keyboard stop working and the mouse also

    I have a problem with my PC mobile device that the keyboard stop working and the mouse also

    All I can suggeset is:
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7
    or
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    Have you looked at the AMDS topic of:
    iOS: Device not recognized in iTunes for Windows
    Do you have han image capture programs linstalled like for a camers or scanner?

  • Is it somebody Except for me Who has problems With waching videos on ipad after the 5.0.1 update

    Is it somebody Except for me Who has problems With waching videos on ipad after the 5.0.1 update

    Hi,
    yes I have big problems as soon as I open the video app i get a total black screen, even the upper bar with the time disappears. I already tried to:
    1. closing the app and reopen it
    2. restart the iPad
    3. restore the iPad via iTunes
    4. Begging the app to work again.

Maybe you are looking for

  • DVI video switch for MB Pro

    I would like to watch movies and Netflix that a stream on my computer to my regular TV instead of my monitor. I was wondering if a product existed that allowed me to come out of the Computer (DVI) into a splitter or switch of some sort and then out t

  • Document distribution...

    Dear All... Greetings!!!!! I am new to DMS,basically I am a PP functional person and am not having that much knowledge abt DMS,but aware abt the functional and how it is carried out at transactional level. I searched abt DISTRIBUTION process in DMS ,

  • Unable to run script (.bat file) on a windows server

    Hi, I have a job definition which execute cmd command (such as cd, echo, etc) through a platform agent installed on a Windows server but when I try to execute scripts (i.e. .bat file) it doesn't work. Can someone help, please ? Regards.

  • Canon forum waste of time!

    One "response" received to my question. Response had absolutely nothing to do with the question I asked. When I emailed her back, I was told to go to the forum to reply. When I come to the forum to reply, I'm told to email them! Goodbye Canon, hello

  • Need to download Adobe Design Std 5.5

    How I can download Adobe Design Std 5.5 now? All links that I find are dead.