Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8170728

TEST_BUG: fail to create RMI registry on port 0 at second time, "java.rmi.server.ExportException: internal error: ObjID already in use"

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 7, 9
    • core-libs
    • None
    • Cause Known

      The issue is exposed by JDK-8170669.

      this is a RMI product issue, below code will throw exception unexpectedly, "java.rmi.server.ExportException: internal error: ObjID already in use"
              Registry registry1 = LocateRegistry.createRegistry(0);
              Registry registry2 = LocateRegistry.createRegistry(0);
      but below code runs successfully as expect,
              Registry registry1 = LocateRegistry.createRegistry(60003);
              Registry registry2 = LocateRegistry.createRegistry(60004);

      Exception in thread "main" java.rmi.server.ExportException: internal error: ObjID already in use
      at java.rmi/sun.rmi.transport.ObjectTable.putTarget(ObjectTable.java:184)
      at java.rmi/sun.rmi.transport.Transport.exportObject(Transport.java:106)
      at java.rmi/sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:259)
      at java.rmi/sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:411)
      at java.rmi/sun.rmi.transport.LiveRef.exportObject(LiveRef.java:147)
      at java.rmi/sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:232)
      at java.rmi/sun.rmi.registry.RegistryImpl.setup(RegistryImpl.java:157)
      at java.rmi/sun.rmi.registry.RegistryImpl.<init>(RegistryImpl.java:142)
      at java.rmi/java.rmi.registry.LocateRegistry.createRegistry(LocateRegistry.java:203)
      at ming.test.rmi.LocateRegistryTest.main(LocateRegistryTest.java:10)

            msheppar Mark Sheppard
            mli Hamlin Li
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: