How to unload/kill rmiRegistry if app was terminated abnormally

Hello,
I use the following method in coding to [1] launch the RMIRegistry to listen on port PORT, [2] Exports the remote object to make it available to receive incoming calls, [3] Bind the service name to the Registry
      int PORT = 1101;
      String HOST_NAME = "myHost";
      String SERVICE_NAME = "myRMIService";
      LocateRegistry.createRegistry( PORT );
      UnicastRemoteObject.exportObject( (MyRMIInterface)MyRMIObj );
      Naming.rebind( "//" + HOST_NAME + ":" + Integer.toString( PORT ) + "/" + SERVICE_NAME, MyRMIObj);However, If I the application was terminated abnormally and then restart the application, I always got the following exceptions separately (which I think the application will try to launch the RMIRegistry again and hence cause the following exceptions)
First Exception:
java.rmi.server.ExportException: internal error: ObjID already in use
     at sun.rmi.transport.ObjectTable.putTarget(Unknown Source)
     at sun.rmi.transport.Transport.exportObject(Unknown Source)
     at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
     at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
     at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
     at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
     at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
     at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
     at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
....Second Exception:
java.rmi.server.ExportException: Port already in use: 1101; nested exception is:
        java.net.BindException: Address already in use: JVM_Bind
        at sun.rmi.transport.tcp.TCPTransport.listen(Unknown Source)
        at sun.rmi.transport.tcp.TCPTransport.exportObject(Unknown Source)
        at sun.rmi.transport.tcp.TCPEndpoint.exportObject(Unknown Source)
        at sun.rmi.transport.LiveRef.exportObject(Unknown Source)
        at sun.rmi.server.UnicastServerRef.exportObject(Unknown Source)
        at sun.rmi.registry.RegistryImpl.setup(Unknown Source)
        at sun.rmi.registry.RegistryImpl.<init>(Unknown Source)
        at java.rmi.registry.LocateRegistry.createRegistry(Unknown Source)
Caused by: java.net.BindException: Address already in use: JVM_Bind
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(Unknown Source)
        at java.net.ServerSocket.bind(Unknown Source)
        at java.net.ServerSocket.<init>(Unknown Source)
        at java.net.ServerSocket.<init>(Unknown Source)
        at sun.rmi.transport.proxy.RMIDirectSocketFactory.createServerSocket(Unknown Source)
        at sun.rmi.transport.proxy.RMIMasterSocketFactory.createServerSocket(Unknown Source)
        at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(Unknown Source)
        ... 11 moreI don't know how to [1] free the RMIRegistry from listening on PORT and [2] also to terminate it from the background (it seems that RMIRegistry was executed in the Windows Task background).
Has anyone got any experiences on dealing with this issue?
Thanks in advance!

I would like to know what's the difference between
LocateRegistry.getRegistry(PORT) and
LocateRegistry.createRegistry(PORT)
It's all there in the Javadoc.
Can the "Registry"-type object be passed-to
UnicastRemoteObjecdt.unexportObject()?As it says in the Javadoc, Registry extends Remote.
'application terminated abnormally" means the
application was terminated by CTRL-C, or any
exceptions raised casuing the application to
terminate itself.I can only assume that you are catching some application exception and trying to restart the whole thing including the Registry from within the same JVM. If you are doing this and starting the Registry gives you 'ObjID in use' then obviously you don't have to start it.
If on the other hand the JVM containing the Registry and your application has completely exited, you can't get 'ObjID in use'.

Similar Messages

  • How do i find out what app was deleted by mistake on my iphone 5?

    How do I find out what app was deleted by mistake on my iphone5?

    Do you mean that you deleted an app by mistake and you don't know which one it was?
    Look for it in the Apps section of iTunes. If you used iTunes to sync your phone, just choose Install next to the app, then resync.

  • How can I tell where an app was installed? I share my iTunes account with family And wanting to install an app and it shows I've  already installed if.

    How can I tell where an app was installed? I share my iTunes account with family And wanting to install an app and it shows I've  already installed it.

    If you are seeing "Installed" in the Purchased section of your iPhone, then it only means that the app is installed on your device. Is that where you are seeing the "Installed"?
    Cheers,
    GB

  • Hyper-V could not replicate changes for virtual machine 'machinename': The connection with the server was terminated abnormally (0x00002EFE).

    I have a 3 node cluster that has replica setup to replicate to another cluster off-site.
    Suddenly one of the servers is not replicating with the error:
    Hyper-V could not replicate changes for virtual machine 'machinename': The connection with the server was terminated abnormally (0x00002EFE). (Virtual Machine ID CC0FD4CC-F9B7-4C68-ABE8-B7D52A87899F)
    All other servers are replicating fine so there cannot be a permissions or connectivity issue between the 2 clusters.
    This server has 2TB of data so I'd rather not have to start the replication again.
    Does anyone have any pointers?
    Thanks.

    Hi drensta,
    Based on my knowledge , "hyper-v replica broker " is needed for failover cluster replica .
    Here is a link for "Why is the "Hyper-V Replica Broker" required?"
    http://blogs.technet.com/b/virtualization/archive/2012/03/27/why-is-the-quot-hyper-v-replica-broker-quot-required.aspx
    Hope this hleps
    Best Regards
    Elton Ji
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to resolve the problem of "Update was terminated" when posting

    hello,
    please give me a favor. I met a big problem when running FB01, the system give me the error message: Express document "Update was terminated" received from author. I test all clients, all of them have the same problem, how to resolve.
    I use SAP ECC6.0 IDES, the error messages recorded by SM16 are:
    DDIC_TYPE_INCONSISTENCY
    SAPLGIVA
    FGVALATT
    16
    //bas/700_REL/src/krn/runt/abucutil.c#2
    ab_RxDdicTypeError
    1053
    20070528145604
    8176
    81920
    0
    37628064
    3299600
    879552
    DG
    SAP (R) - R/3(TM) Callstack, Version 1.0
    Copyright (C) SAP AG. All rights reserved.
    Callstack without Exception:
    App : disp+work.EXE (pid=5564)
    When : 5/28/2007 14:56:4.843
    Threads : 2
    Computer Name : EXXEPT01
    User Name : SAPServiceER1
    Number of Processors: 2
    Processor Type: x86 Family 6 Model 15 Stepping 6
    Windows Version : 5.2 Current Build: 3790
    State Dump for Thread Id d10
    eax=00000201 ebx=00000484 ecx=00000210 edx=04bcf0de esi=00000484 edi=00000000
    eip=7c82ed54 esp=053cd608 ebp=053cd678 iopl=0 nv up ei pl zr na po nc
    eip=7c82ed54 esp=07e5fec0 ebp=07e5ff04 iopl=0         nv up ei pl zr na po nc
    cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000246
    function : KiFastSystemCallRet
            7c82ed54 c3               ret
            7c82ed55 8da42400000000   lea     esp,[esp]              ss:07e5fec0=7c821514
            7c82ed5c 8d642400         lea     esp,[esp]              ss:29d6e4d3=????????
    FramePtr ReturnAd Param#1  Param#2  Param#3  Param#4  Function Name
    07e5ff04 010f51e5 000006e0 00000000 00000000 0613e580 ntdll!KiFastSystemCallRet
    07e5ff84 7c349565 00000000 00000000 00000000 0613e618 disp+work!SigIMsgFunc [signt.c (594)]
    07e5ffb8 77e66063 0613e618 00000000 00000000 0613e618 MSVCR71!endthreadex
    07e5ffec 00000000 7c3494f6 0613e618 00000000 00000000 kernel32!GetModuleFileNameA
    -cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00200246
    function : KiFastSystemCallRet
    7c82ed54 c3 ret
    7c82ed55 8da42400000000 lea esp,[esp] ss:053cd608=7c822124
    7c82ed5c 8d642400 lea esp,[esp] ss:272dbc1b=????????
    FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
    053cd678 77e6ba12 00000484 ffffffff 00000000 053cd6ac ntdll!KiFastSystemCallRet
    053cd68c 0100a516 00000484 ffffffff 00000002 00000001 kernel32!WaitForSingleObject
    053cd6ac 0055ab69 0055aba2 7c38b5c8 7c38b5c8 7c38b5c8 disp+work!NTDebugProcess [ntstcdbg.c (449)]
    053cd6b0 0055aba2 7c38b5c8 7c38b5c8 7c38b5c8 01d28c78 disp+work!NTStack [dptstack.c (1365)]
    053cd6cc 0055abd6 7c38b5c8 00000000 00852a87 7c38b5c8 disp+work!CTrcStack2 [dptstack.c (352)]
    053cd6d8 00852a87 7c38b5c8 00000000 005f0059 00310030 disp+work!CTrcStack [dptstack.c (182)]
    053cd6fc 00855dd9 00000020 a02899f8 a02b037c 00000000 disp+work!rabax_CStackSave [abrabax.c (6842)]
    053cd7d4 007fa810 0141ec20 0141ebf0 0000041d 203ec5e0 disp+work!ab_rabax [abrabax.c (1213)]
    053cd7ec 00a1d65f a0284050 0000007b 053cd868 00000000 disp+work!ab_RxDdicTypeError [abucutil.c (1053)]
    053cd818 00a1d747 a02a4fe0 a02a4fe0 a02a4fe0 00000000 disp+work!FirstLevelChildCnt [scsypar.c (3423)]
    053cd894 00a1dca1 053cd8cc a02a4fe0 053d0d20 053d0ce4 disp+work!UcTypeToTree [scsypar.c (3578)]
    053d0d28 00a1dd69 053d0d44 a02a4fe0 00000000 a02a4fe0 disp+work!UcTypeToFragView [scsypar.c (3845)]
    053d0d70 00a170f0 a02a4fe0 104e3ac8 00000000 00a0cfa7 disp+work!sc_tparUcFragView [scsypar.c (3897)]
    053d0d80 00a0cfa7 a02a4fe0 00000000 0295d6d4 a01bc106 disp+work!sc_loadflds [scsytyp.c (813)]
    053d0d9c 00a1aafa a01bc106 0295d6d4 00000000 0295d6d4 disp+work!sc_ddictab [scsyddic.c (166)]
    053d0ef8 00a1b4f8 00000004 053d0f20 a01bc106 0295d6d4 disp+work!simple_type_find_1 [scsytyp.c (2999)]
    053d0f24 00a1b762 a01bc106 00000004 0295d6d4 0000000b disp+work!sc_complex_type_find [scsytyp.c (2621)]
    053d0f4c 00a13e2b a01bc106 0000000b 00000000 0295d6d4 disp+work!sc_ctypid [scsytyp.c (2447)]
    053d0f6c 00b8c83a 00000001 00000005 00000002 053d7a1c disp+work!sc_typid [scsymb.c (1733)]
    053d79d4 009d2f1d 000000d1 0294d7d4 02939df8 02939d94 disp+work!rs_expan_abap [rsabap32.c (1241)]
    053d79e8 00a08072 000000d1 053d7b04 a01bc0f4 00000000 disp+work!sc_expan [rsyn6.c (2228)]
    053d7adc 00a076df 00000000 053d7b04 00000000 00000005 disp+work!parse [rsyn4.c (1398)]
    053d7b1c 00a5c027 00000076 00000000 00000001 00000001 disp+work!sc_check [rsyn4.c (402)]
    053d816c 00b2b436 00000000 06474310 06495096 00000000 disp+work!sc_inclu [rsyn31.c (1675)]
    053debd4 009d2f1d 00000076 0294d7d4 02939124 02939114 disp+work!rs_expan_abap [rsabap31.c
    053debe8 00a08072 00000076 053ded04 a01ae0f0 00000000 disp+work!sc_expan [rsyn6.c (2228)]
    053decdc 00a076df 00000000 053ded04 00000000 00000005 disp+work!parse [rsyn4.c (1398)]
    053ded1c 00a5c027 00000076 00000000 00000001 00000001 disp+work!sc_check [rsyn4.c (402)]
    053df36c 00b2b436 00000000 00000000 00000000 00000000 disp+work!sc_inclu [rsyn31.c (1675)]
    053e5dd4 009d2f1d 00000076 0294d7d4 02939124 02939114 disp+work!rs_expan_abap [rsabap31.c
    053e5de8 00a08072 00000076 053e5f04 a01a00ec 00000000 disp+work!sc_expan [rsyn6.c (2228)]
    053e5edc 00a076df 00000000 053e5f04 00000000 00000000 disp+work!parse [rsyn4.c (1398)]
    053e5f1c 00a08b07 0295ba90 053e9c88 053e64c8 009ce139 disp+work!sc_check [rsyn4.c (402)]
    053e5f2c 009ce139 00000000 00000000 00000000 053e64a0 disp+work!sc_checkStart [rsyn4.c (24
    053e64c8 007e0f7f 053e9c88 00000001 00000000 00000000 disp+work!cg_generate [cgmain2.c (65
    053e6510 0057a552 053e9c88 00000000 00000000 053ec954 disp+work!ab_gabap [abgen.c (1592)]
    053e9cf8 007e1558 00000041 a0828954 00000000 00000000 disp+work!dy_gen_abap [dynpabsv.c (2
    053ec914 00656064 a0828954 00000000 00000000 00000000 disp+work!ab_genprog [abgen.c (1345)
    053ec964 006566ab a0828954 00000000 00000001 053ec9a4 disp+work!newload [abload1.c (388)]
    053ec990 0065673b a0828954 00000001 053ec9a4 00000000 disp+work!ab_LoadProgOrTrfo [abload1
    053ec9a8 0072796a a0828954 00000001 00000000 00000000 disp+work!ab_LoadProg [abload1.c (77
    053ecadc 00708d14 00000000 a016ff64 0000001e 00003623 disp+work!ab_link [ablink.c (381)]
    053ecb04 0070c9c0 a016ff64 0000001e 00000000 a0828954 disp+work!perform_load [abperf.c (68
    053ed0bc 0067af78 00000003 a080fd88 00000000 053ed124 disp+work!ab_jxper [abperf.c (478)]
    a016ff64 80000000 005f004c 80000000 00000044 80000000 disp+work!ab_extri [abextri.c (552)]
    005f0025 458bec8b b1908a08 56000000 8a0c758b 0000b18e <nosymbols>
    005f0025 458bec8b b1908a08 56000000 8a0c758b 0000b18e <nosymbols>
    55c3c95b 00000000 00000000 00000000 00000000 00000000 <nosymbols>
    State Dump for Thread Id 14ec
    eax=00000001 ebx=00000103 ecx=fffffffe edx=05580000 esi=00000000 edi=00000000
    eip=7c82ed54 esp=07e5fec0 ebp=07e5ff04 iopl=0 nv up ei pl zr na po nc
    cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000246
    function : KiFastSystemCallRet
    7c82ed54 c3 ret
    7c82ed55 8da42400000000 lea esp,[esp] ss:07e5fec0=7c821514
    7c82ed5c 8d642400 lea esp,[esp] ss:29d6e4d3=????????
    FramePtr ReturnAd Param#1 Param#2 Param#3 Param#4 Function Name
    07e5ff04 010f51e5 000006e0 00000000 00000000 0613e580 ntdll!KiFastSystemCallRet
    07e5ff84 7c349565 00000000 00000000 00000000 0613e618 disp+work!SigIMsgFunc [signt.c (594)]
    07e5ffb8 77e66063 0613e618 00000000 00000000 0613e618 MSVCR71!endthreadex
    07e5ffec 00000000 7c3494f6 0613e618 00000000 00000000 kernel32!GetModuleFileNameA
    -FAGLFLEXT
    123
    700 Windows NT 2x Intel 80686 EXXEPT01 ORACLE ER1 EXXEPT01
    700
    NT 5.0 2195 Service Pack 4 x86 MS VC++ 13.10
    OCI_10103_SHARE
          Gregory

    Hello Greg,
    Thank you for this question. What you are reporting looks to me like requires deeper analysis in the system. The channel for such questions is the Service Marketplace <i>http://service.sap.com/.</i> Please post it there.
    Thank you!
    Kind regards, Kyoko

  • New Mac user: how do I kill a fishing app in safari?

    I have a pop-up in Safari. It appears to be a fishing app. I can't kill the window. Closing Safari and rebooting doesn't help. When Safari is reopened, the pop-up is still active.

    Quit Safari (by force if necessary.) Relaunch it by holding down the shift key and clicking its icon in the Dock. That will stop the page from reloading automatically. Select Safari > Preferences > Privacy > "Remove all website data" to get rid of any cookies or other data left by the server. Open your Downloads folder and delete anything you don't recognize.

  • HT201365 On this new ios7 update how do I kill apps running in the background now? I used to be able to double tap the home button

    On this new ios7 update how do I kill apps running in the background now? I used to be able to double tap the home button

    Double tap the home button.  Slide the preview window upward.  You can do 2 at a time.
    It's rarely useful or necessary to do this. Very few apps actually "run in the background" (such as audio streaming and navigation apps).  The vast majority are frozen and consume no resources.  The iOS manages memory for you to optimize running apps.
    iOS: Understanding multitasking
    Message was edited by: modular747

  • How do you access updates to apps from the App store after changing to a new ID because the password on the old ID was changed and you don't know what it is now?

    How do you access updates to apps from the App store after changing to a new ID because the password on the old ID was changed by the former husband and you don't know what it is now?  And you set up your own new ID and account but can NOT access the updates, from the App store for the many apps that you already have, because they require that you sign in with that former now inaccessible ID and account and password?  Call it a problem of modern times and changing relationships, if you want to be charitable.

    So I guess it will only be new apps that I download that are allowed to give me their updates while 13 updates wait for me on an ID I can no longer access.
    Yes...  sorry.
    In the future, if need be, you can re download your purchases for free  >  Downloading past purchases from the App Store, iBookstore, and iTunes Store
    Good rule of thumb is to back up your purchases regardless  >  Mac App Store: Backing up your app purchases

  • My iPhoto app was  digressed back to 9.5, not sure how I did it.  I then went to time machine and restored it.  Now when i try to open it, I get a message that iPhoto is on a disk and locked tells me that I don't have permisson to unlock it.  Help ?

    My iPhoto app was digressed back to 9.5, not sure how I did it.  I went to time machine and restored. Now it wont accept my password.  tells me it is locked.  Can anyone help me?

    Run Repair Permissions in Disk Utility and see if that helps.
    If not, you can select the iPhoto Library in your Pictures folder, go File > Get Info (or Command-i), go to the bottom of the info window and set your permissions to Read & Write. On the Action menu at the bottom (the one with the gear) choose Apply to enclosed items...

  • I can't update my apps, was asked to change from US store to Lebanese store. How to do that?

    I can't update my apps, was asked to change from US store to Lebanese store. How to do that?

    Follow this procedure:
    1. Go to Settings > iTunes &amp; App Stores > Apple ID.
    2. Tap your Apple ID.
    3. Tap View Apple ID.
    4. Enter your password.
    5. Go to Country/Region in the popup window to change to the desired store.
    See also: http://support.apple.com/kb/HT1311

  • How can I replace an existing app on iTunes that was created with PhoneGap to a new version created with Adobe DPS? I get a 'supported devices' error message when I try to upload to iTunes! HELP!

    I created an app using PhoneGap a couple of months ago, and have now just amended it using Adobe DPS. But when I come to upload it to iTunes, I get the error message "This bundle does not support on or more of the device supported by the previous app version" How can I correct this?

    I suspect your PhoneGap app was flagged as running on both iPad and iPhone. You'll need the same from DPS. You can do this in AppBuilder at the start of the wizard where it asks what kind of devices you want to support. Note that this is only available to DPS Professional and Enterprise customers. If you are a Creative Cloud customer building a Single Edition application it will only support iPad.
    Neil

  • Guys i have a problem, I used to download apps from one of my friends apple id, now i created my new account, but when i was about to update my apps its asks for my friends id and password. now how could i update my old apps from my new apple id?

    Guys i have a problem, I used to download apps from one of my friends apple id, now i created my new account, but when i was about to update my apps its asks for my friends id and password. now how could i update my old apps from my new apple id?

    The_Tonmoy wrote:
    I have no communication with my that friend :/ So it means i need to delete those apps? There's no other solution to update those apps?
    No.  purchases are forever tied to the apple ID used to buy them.  Delete them and buy your own copies.

  • How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn- the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign.

    How can I turn-off the apps which I have opened once in ISO 7.0.2. In previous version of ISO it was easy to turn-off the opened apps by double clicking on home button and then click and hold on respective apps then click on cross sign but in this version I could not do so and my iPad appears slower.

    Close inactive apps
    1. Double tap the home button to bring up the multi-tasking view
    2. Swipe the app's windows upwards to close
    3. The app will fly off the screen

  • One of my apps was pushed to the side of my screen to where I can no longer see it, however, when I do an app expose it pops up. Unfortunately as soon as I click on it it disappears again. How do I fix this?

    On my lap top one of my apps was pushed to the right side of my screen to where I can no longer see it, however, when I do an app expose it pops up. Unfortunately as soon as I click on the app it disappears again. How do I fix this?

    Try relaunching the Finder. Type command, option and esc (three keys together), click on Fidner, then Relaunch.

  • How do I change my birthdate that was entered in on my Adobe App.  I want to convert images to pdf

    How do I change my birthdate that was entered in on my Adobe App.  I want to convert images to pdf

    What Adobe app?

Maybe you are looking for

  • Tax Error while posting Customer Invoice

    Hello Everyone, When I try to post a customer invoice using one of the default tax code (eg. 1O - output tax 10%), during simulation the system gives following error message with the item list as below: "Error message still exist - see error log". Th

  • Define Account group with screen Layout (Vendor)

    Hello, Normally, for Intra-Inter company suppliers, we don't apply Withholding Tax. In the customizing of vendor account group, for the group "Inter-Intra company suppliers", witholding Tax informations are suppressed. The problem is i want to change

  • Advice needed on how to avoid bogus warning "suspected phishing site"?

    I keep getting bogus warning "suspected phishing site" that sometimes blocks safe sites. I have checked the firewall, which is off and allowing all incoming connections. How can I avoid such bogus warning?

  • I need help with my ipods error 21 please help

    my ipod doesn't like to restore on my computer its a windows 7 and i have the latest itunes can somebody please help me the i

  • Adobe Flash 11.3.300.262 crashing

    I tried 3 times to install the latest update and its still crashing with Firefox 13.0.1. I had to go back to the 10.3 in Adobe. Does anyone know if there are any more updates planned to fix this or anything else I can do? Very frustrating.When I did