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

RMI-IIOP EJB clients do not fail over due to defect in JDK 1.6.0_12

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b06
    • CPU:
      x86
    • OS:
      windows_xp
    • Verification:
      Verified

      Backports

        Description

        the failover works fine, if client uses the thick client( WebLogic ORB).
        The bug seems to be in com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.java

        With the exception:

        org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 203 completed: No
                at com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(ORBUtilSystemException.java:2231)
                at
        com.sun.corba.se.impl.logging.ORBUtilSystemException.writeErrorSend(ORBUtilSystemException.java:2253)
                at
        com.sun.corba.se.impl.transport.SocketOrChannelConnectionImpl.writeLock(SocketOrChannelConnectionImpl.java:933)
                at
        com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendFragment(BufferMan @ agerWriteStream.java:78)
                at
        com.sun.corba.se.impl.encoding.BufferManagerWriteStream.sendMessage(BufferMana gerWriteStream.java:96)
                at
        com.sun.corba.se.impl.encoding.CDROutputObject.finishSendingMessage(CDROutputObject.java:144)
                at
        com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.finishSendingRequest(CorbaMessageMediatorImpl.java:247)
                at
        com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete1(CorbaClientRequestDispatcherImpl.java:342)
                at
        com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(CorbaClientRequestDispatcherImpl.java:323)
                at
        com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(CorbaClientDelegateImpl.java:129)
                at
        com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.is_a(CorbaClientDelegateImpl.java:213)
                at org.omg.CORBA.portable.ObjectImpl._is_a(ObjectImpl.java:112)
                at weblogic.corba.j2ee.naming.Utils.narrowContext(Utils.java:126)
                at
        weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:94)
                at
        weblogic.corba.j2ee.naming.InitialContextFactoryImpl.getInitialContext(InitialContextFactoryImpl.java:31)
                at
        weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContextFactory.java:41)
                at
        javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:667)
                at
        javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:288)
                at javax.naming.InitialContext.init(InitialContext.java:223)
                at javax.naming.InitialContext.<init>(InitialContext.java:197)
                at
        ServerAffinityHashtablePropsTest.main(ServerAffinityHashtablePropsTest.java:25)

        To reproduce the problem:
        ------------------------

        Please download the attachment

        TestCase_Sun.zip

        After downloading the attachment, extract it and you will find three files

        1) client.jar - This jar contains the EJB client and needs to be put in the Client Classpath

        2) ejb20_basic_statefulSession.ear - This ear is the EJB application which needs to be deployed on WebLogic Server

        3) ejb20_basic_statefulSession_client.jar - This client jar contains the stubs and other artifacts required for the EJB client to run.

        The problem:
        -------------
        From customer:
        On receiving ForwardRequest exception, JDK ORB threw RemarshalException which causes request to be sent to the failover target set in the ForwardRequest object. Where as in JDK 1.6.0_12-b04 on receiving ForwardRequest exception, JDK ORB is throwing org.omg.CORBA.COMM_FAILURE instead of RemarshalException and org.omg.CORBA.COMM_FAILURE will not cause request to be sent to the failover target set in the ForwardRequest object. This seems to be a bug in the JDK.


        Steps to replicate
        ------------------
        1) Create a domain in WebLogic Server 10.3 using the the latest SUN JDK 1.6 available.
        2) Start the server and deploy the ejb20_basic_statefulSession.ear application to a WebLogic Cluster of two managed server instances.
        3) Start the application
        4) Set the client classpath correctly

        For eg:

        C:\bea103\user_projects\domains\EJB_IIOP_Failoverdomain>set CLASSPATH=C:\bea103\wlserver_10.3\server\lib\wlclient.jar;C:\bea103\user_projects\domains\EJB_IIOP_Failoverdomain\EJB_IIOP\client\ejb20_basic_statefulSession_client.jar;C:\bea103\user_projects\domains\EJB_IIOP_Failoverdomain\EJB_IIOP\client\client.jar;%CLASSPATH%

        5) Invoke the client

        For eg:

        C:\bea103\user_projects\domains\EJB_IIOP_Failoverdomain>java -Xbootclasspath/p:C:\bea103\user_projects\domains\EJB_IIOP_Failoverdomain\EJB_IIOP\client\jdkpatch.jar examples.ejb20.basic.statefulSession.Client iiop://localhost:7003,localhost:7004

        6) Now, when the client is invoked, it would make a request to any of the managed servers, you can watch the stdout of the managed servers to see which one was invoked. Kill that server immediately.

        7) Now, you would see an exception in the client, as it was not able to failover to the next server

        You will notice a org.omg.CORBA.COMM_FAILURE exception in the client window. There is a sleep added for one minute in the EJB client code in order to give you room for shutting down the WebLogic managed instance.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                vikram Vikram Aroskar (Inactive)
                Reporter:
                hnassiry Haroon Nassiry (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: