0 Replies Latest reply on Oct 4, 2013 11:07 AM by Vikram Murugesan

    org.omg.CORBA.MARSHAL: unknown value tag: 0x1 (offset=0x100)

    Vikram Murugesan Newbie



      I am working on migrating an application from EAP 5.1.2 (uses jdk 1.6.0_51) to EAP 6.0.1 (uses jdk1.7.0_25)


      The application has an IIOP listener which is capable of handling IIOP requests using jacorb and sending back appropriate responses based on some business logic. (Please excuse me if my terminologies are not right, I am very new to IIOP and jacorb and still learning)


      I have a simple client that uses ibmjdk 6.0 to invoke this remote method on my server. I tried to invoke this client with EAP 5.1.2 and it works perfectly well.


      But for some reason the same code throws this marshalling exception on line number 24 below.


      // variable 'remoteMethod' is of type java.lang.reflect.Method
      // variable 'in' is of type org.jacorb.orb.giop.RequestInputStream
      Class<?>[] parameterTypes = remoteMethod.getParameterTypes();
      Serializable[] parameterValues = new Serializable[parameterTypes.length];
        for (int i = 0; i < parameterTypes.length; i++) {
             if (parameterTypes[i] == boolean.class) {
                  parameterValues[i] = in.read_boolean();
             } else if (parameterTypes[i] == byte.class) {
                  parameterValues[i] = in.read_octet();
             } else if (parameterTypes[i] == short.class) {
                  parameterValues[i] = in.read_short();
             } else if (parameterTypes[i] == char.class) {
                  parameterValues[i] = in.read_char();
             } else if (parameterTypes[i] == int.class) {
                  parameterValues[i] = in.read_long();
             } else if (parameterTypes[i] == long.class) {
                  parameterValues[i] = in.read_longlong();
             } else if (parameterTypes[i] == float.class) {
                  parameterValues[i] = in.read_float();
             } else if (parameterTypes[i] == double.class) {
                  parameterValues[i] = in.read_double();
             } else {
                  parameterValues[i] = in.read_value(parameterTypes[i]); // this is the line that throws exception


      Here is the stack trace,


      11:00:02,276 ERROR [com.abc.myapp.iiop.server.IIOPRequestHandler] (IIOPListener1) requestReceive: unknown value tag: 0x1 (offset=0x100): org.omg.CORBA.MARSHAL: unknown value tag: 0x1 (offset=0x100)
        at org.jacorb.orb.CDRInputStream.read_value(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at org.jboss.com.sun.corba.se.impl.io.IIOPInputStream.inputObjectField(IIOPInputStream.java:2130) [jboss-rmi-api_1.0_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2]
        at org.jboss.com.sun.corba.se.impl.io.IIOPInputStream.inputClassFields(IIOPInputStream.java:2357) [jboss-rmi-api_1.0_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2]
        at org.jboss.com.sun.corba.se.impl.io.IIOPInputStream.inputObject(IIOPInputStream.java:1306) [jboss-rmi-api_1.0_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2]
        at org.jboss.com.sun.corba.se.impl.io.IIOPInputStream.simpleReadObject(IIOPInputStream.java:397) [jboss-rmi-api_1.0_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2]
        at org.jboss.com.sun.corba.se.impl.io.ValueHandlerImpl.readValueInternal(ValueHandlerImpl.java:361) [jboss-rmi-api_1.0_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2]
        at org.jboss.com.sun.corba.se.impl.io.ValueHandlerImpl.readValue(ValueHandlerImpl.java:322) [jboss-rmi-api_1.0_spec-1.0.4.Final-redhat-2.jar:1.0.4.Final-redhat-2]
        at org.jacorb.util.ValueHandler.readValue(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at org.jacorb.orb.CDRInputStream.read_untyped_value(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at org.jacorb.orb.CDRInputStream.read_typed_value(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at org.jacorb.orb.CDRInputStream.read_value(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at com.abc.myapp.iiop.server.IIOPRequestHandler.ejbMethodCall(IIOPRequestHandler.java:228) [myapp-core.jar:]
        at com.abc.myapp.iiop.server.IIOPRequestHandler.requestReceived(IIOPRequestHandler.java:145) [myapp-core.jar:]
        at org.jacorb.orb.giop.GIOPConnection.receiveMessages(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at com.abc.myapp.iiop.server.IIOPMessageReceptor.doWork(IIOPMessageReceptor.java:38) [myapp-core.jar:]
        at org.jacorb.util.threadpool.ConsumerTie.run(Unknown Source) [jacorb-2.3.2-redhat-2.jar:]
        at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25]


      I have been trying to see which part of jacorb's code is causing this and have been unsuccessful in identifying the root cause.


      I wanted to try using the old jacorb version (from EAP 5.1.2)  by putting it in the EAR and excluding the jacorb module, but I understand it is not an easy workaround and there is already a JIRA opened (how to replace the default ORB implementation (jacorb)?).


      I also saw this thread which was close to my issue, but looks like it was reported for EAP 5.2.0 and a lot should have already changed by now - ([JBPAPP-9895] ExceptionTimingStressTestCase fails on IBMJDK7 consistently due to MarshalException - JBoss Issue Tracker)


      Just to rule out the odds, I even tried using JDK 6 with EAP 6.0.1, still didn't work.


      Appreciate any help or thoughts on this issue.