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

test/java/rmi/registry/classPathCodebase/ClassPathCodebase.java fails with modules build

XMLWordPrintable

    • team
    • generic
    • generic

      Test
      java/rmi/registry/classPathCodebase/ClassPathCodebase.java

      fails with modules build because Registry.bind() throws java.lang.NoClassDefFoundError.


      Test output:
      Regression test for bug 4242317

      TEST_LIBRARY: ./Dummy.class
      TEST_LIBRARY: /tmp/1/codebase_IMPORT_/Dummy.class
      TEST_LIBRARY: Installed class "Dummy" in codebase file:/tmp/1/codebase_IMPORT_/
      TEST_LIBRARY: ./Dummy.class
      TEST_LIBRARY: /tmp/1/codebase_EXPORT_/Dummy.class
      TEST_LIBRARY: Installed class "Dummy" in codebase file:/tmp/1/codebase_EXPORT_/

      Command used to spawn rmiregistry process:
              [/net/vmsqe.russia/export/jdk/oj/promoted/preview/b06/ojdk/linux-i586/bin/rmiregistry, -J-Denv.class.path=., -J-Djava.rmi.server.codebase=file:/tmp/1/codebase_EXPORT_/, 2006]

      java.rmi.ServerError: Error occurred in server thread; nested exception is:
              java.lang.NoClassDefFoundError: java/rmi/Remote
              at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:410)
              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
              at sun.rmi.transport.Transport$1.run(Transport.java:177)
              at sun.rmi.transport.Transport$1.run(Transport.java:174)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:717)
              at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:273)
              at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:251)
              at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:377)
              at sun.rmi.registry.RegistryImpl_Stub.bind(Unknown Source)
              at ClassPathCodebase.main(ClassPathCodebase.java:124)
      Caused by: java.lang.NoClassDefFoundError: java/rmi/Remote
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:793)
              at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:144)
              at java.net.URLClassLoader.defineClass(URLClassLoader.java:423)
              at java.net.URLClassLoader.access$100(URLClassLoader.java:75)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:294)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:429)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:416)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
              at java.lang.Class.forName0(Native Method)
              at java.lang.Class.forName(Class.java:266)
              at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:453)
              at sun.rmi.server.LoaderHandler.loadClass(LoaderHandler.java:184)
              at java.rmi.server.RMIClassLoader$2.loadClass(RMIClassLoader.java:637)
              at java.rmi.server.RMIClassLoader.loadClass(RMIClassLoader.java:264)
              at sun.rmi.server.MarshalInputStream.resolveClass(MarshalInputStream.java:216)
              at java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:1593)
              at java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1514)
              at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1750)
              at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1347)
              at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
              at sun.rmi.registry.RegistryImpl_Skel.dispatch(Unknown Source)
              at sun.rmi.server.UnicastServerRef.oldDispatch(UnicastServerRef.java:403)
              at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:267)
              at sun.rmi.transport.Transport$1.run(Transport.java:177)
              at sun.rmi.transport.Transport$1.run(Transport.java:174)
              at java.security.AccessController.doPrivileged(Native Method)
              at sun.rmi.transport.Transport.serviceCall(Transport.java:173)
              at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:553)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:808)
              at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:667)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
              at java.lang.Thread.run(Thread.java:717)
      Caused by: java.lang.ClassNotFoundException: java.rmi.Remote
              at java.net.URLClassLoader$1.run(URLClassLoader.java:299)
              at java.net.URLClassLoader$1.run(URLClassLoader.java:288)
              at java.security.AccessController.doPrivileged(Native Method)
              at java.net.URLClassLoader.findClass(URLClassLoader.java:287)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:429)
              at java.lang.ClassLoader.loadClass(ClassLoader.java:362)
              ... 37 more
      Exception in thread "main" java.lang.RuntimeException: TEST FAILED: java.rmi.ServerError: Error occurred in server thread; nested exception is:
              java.lang.NoClassDefFoundError: java/rmi/Remote
              at ClassPathCodebase.main(ClassPathCodebase.java:168)

            alanb Alan Bateman
            nhaustov Nicolay Haustov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: