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

org.omg.CORBA.UNKNOWN exceptions are thrown if throw Exceptions in iiop remote methods

XMLWordPrintable

    • b155
    • 9

      This looks to be introduced in JDK 9 b155. I attached source codes to reproduce the failures. Reproducible on all platforms.

      Reproduce steps:
      1. compile the codes with javac
      2. generate tie files as following
      /path-to-jdk-9/bin/rmic -classpath . -iiop -keepgenerated -d . ProcessorImpl LegacyProcessorServer
      3. start tnameserv
      /path-to-jdk-9/bin/tnameserv.exe -ORBInitialPort 4050 &
      4. Launch the server side
      /path-to-jdk-9/bin/java -Dsun.reflect.debugModuleAccessChecks --add-modules java.corba,jdk.rmic -Dsun.reflect.enableModuleChecks=debug -Dorg.omg.CORBA.ORBInitialPort=4050 -Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBClass=com.sun.corba.se.impl.orb.ORBImpl -Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.se.impl.orb.ORBSingleton -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory -Djava.naming.provider.url=iiop://localhost:4050 -classpath "./" --add-exports jdk.rmic/sun.tools.java=ALL-UNNAMED LegacyProcessorServer sun_orb &

      5. Run client side:
      /path-to-jdk-9/bin/java -Dsun.reflect.debugModuleAccessChecks --add-modules java.corba,jdk.rmic -Dsun.reflect.enableModuleChecks=debug -Dorg.omg.CORBA.ORBInitialPort=4050 -Dorg.omg.CORBA.ORBInitialHost=localhost -Dorg.omg.CORBA.ORBClass=com.sun.corba.se.impl.orb.ORBImpl -Dorg.omg.CORBA.ORBSingletonClass=com.sun.corba.se.impl.orb.ORBSingleton -Djava.naming.factory.initial=com.sun.jndi.cosnaming.CNCtxFactory -Djava.naming.provider.url=iiop://localhost:4050 -classpath . --add-exports jdk.rmic/sun.tools.java=ALL-UNNAMED Client "corbaname:iiop:1.2@localhost:4050#sun_orb" IIOPProcessorFactory


      Expected: it passed all tests.
      Actually: all failed.
      Detail stacktraces as below:
      ---------------------------------------------
      Executing Test: testRuntimeException
      RuntimeException reason string is not expected:
      org.omg.CORBA.UNKNOWN: vmcid: 0x0 minor code: 0 completed: Maybe
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.UEInfoServiceCont
      ext.<init>(UEInfoServiceContext.java:52)
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
      nce0(Native Method)
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
      nce(NativeConstructorAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newI
      nstance(DelegatingConstructorAccessorImpl.java:45)
              at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:
      466)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContextDat
      a.makeServiceContext(ServiceContextData.java:132)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContexts.u
      nmarshal(ServiceContexts.java:216)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContexts.g
      et(ServiceContexts.java:378)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContexts.g
      et(ServiceContexts.java:366)
              at java.corba@9-ea/com.sun.corba.se.impl.protocol.CorbaClientRequestDisp
      atcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:530)
              at java.corba@9-ea/com.sun.corba.se.impl.protocol.CorbaClientRequestDisp
      atcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:373)
              at java.corba@9-ea/com.sun.corba.se.impl.protocol.CorbaClientDelegateImp
      l.invoke(CorbaClientDelegateImpl.java:148)
              at java.corba@9-ea/org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.
      java:475)
              at _ProcessorInterface_Stub.testRuntimeException(Unknown Source)
              at TesterImpl.testRuntimeException(TesterImpl.java:65)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
      e Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
      MethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
      legatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:543)
              at TesterImpl.performTests(TesterImpl.java:34)
              at Client.main(Client.java:37)
      Unexpected InvocationTargetException:
      java.lang.reflect.InvocationTargetException
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
      e Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
      MethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
      legatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:543)
              at TesterImpl.performTests(TesterImpl.java:34)
              at Client.main(Client.java:37)
      Caused by: java.lang.RuntimeException: Bad reason string: []
              at TesterImpl.testRuntimeException(TesterImpl.java:71)
              ... 6 more

      ---------------------------------------------
      Executing Test: testRemoteException
      Unexpected InvocationTargetException:
      java.lang.reflect.InvocationTargetException
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Nativ
      e Method)
              at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Native
      MethodAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(De
      legatingMethodAccessorImpl.java:43)
              at java.base/java.lang.reflect.Method.invoke(Method.java:543)
              at TesterImpl.performTests(TesterImpl.java:34)
              at Client.main(Client.java:37)
      Caused by: org.omg.CORBA.UNKNOWN: vmcid: 0x0 minor code: 0 completed: Maybe
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.UEInfoServiceCont
      ext.<init>(UEInfoServiceContext.java:52)
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
      nce0(Native Method)
              at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInsta
      nce(NativeConstructorAccessorImpl.java:62)
              at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newI
      nstance(DelegatingConstructorAccessorImpl.java:45)
              at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:
      466)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContextDat
      a.makeServiceContext(ServiceContextData.java:132)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContexts.u
      nmarshal(ServiceContexts.java:216)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContexts.g
      et(ServiceContexts.java:378)
              at java.corba@9-ea/com.sun.corba.se.spi.servicecontext.ServiceContexts.g
      et(ServiceContexts.java:366)
              at java.corba@9-ea/com.sun.corba.se.impl.protocol.CorbaClientRequestDisp
      atcherImpl.processResponse(CorbaClientRequestDispatcherImpl.java:530)
              at java.corba@9-ea/com.sun.corba.se.impl.protocol.CorbaClientRequestDisp
      atcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:373)
              at java.corba@9-ea/com.sun.corba.se.impl.protocol.CorbaClientDelegateImp
      l.invoke(CorbaClientDelegateImpl.java:148)
              at java.corba@9-ea/org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.
      java:475)
              at _ProcessorInterface_Stub.testRemoteException(Unknown Source)
              at TesterImpl.testRemoteException(TesterImpl.java:84)
              ... 6 more
      Exception in thread "main" java.lang.RuntimeException: 2 unexpected failures
              at Client.main(Client.java:42)

        1. client.log
          198 kB
          Xiaofeng Yang
        2. server.log
          396 kB
          Xiaofeng Yang

            Unassigned Unassigned
            xiaofeya Xiaofeng Yang
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: