RP/TUX 8.1/TUX 9.1 - CORBA can't generate union default discriminator correctly if it is in enum type (Doc ID 777372.1)

Last updated on NOVEMBER 04, 2016

Applies to:

Oracle Tuxedo / Tuxedo / 8.1,9.1
Information in this document applies to any platform

Goal

DESCRIPTION:
There is an idl file as follows:
module WTCCorbaL2R
{
  enum EnumType {first, second, third, fourth, fifth};
  union UnionType switch(EnumType) {
   case first: long win;
   case second: short place;
   case third:
   case fourth: octet show;
   default: boolean other;
  };

  interface Outbound_socket
  {
    UnionType  Outbound_inout_union(in UnionType in_union, inout UnionType inout_union, out UnionType out_union);
  };

  interface Outbound_socketFactory
  {
    Outbound_socket find_Outbound_socket();
  };
};

The invocation from WTC to Tuxedo that used the union type defined in the idl file was failed. The following is the
stack trace:
    org.omg.CORBA.BAD_PARAM:   vmcid: 0x0  minor code: 0  completed: No
        at WTCCorbaL2R.EnumType.from_int(EnumType.java:38)
        at WTCCorbaL2R.EnumTypeHelper.read(EnumTypeHelper.java:45)
        at WTCCorbaL2R.UnionTypeHelper.read(UnionTypeHelper.java:102)
        at WTCCorbaL2R._Outbound_socketStub.Outbound_inout_union(_Outbound_socketStub.java:22)
        at weblogic.qa.tests.wtc.corba.outbound.OutboundCorbaBean.Outbound_inout_union(OutboundCorbaBean.java:160)
        at
weblogic.qa.tests.wtc.corba.outbound.OutboundCorba_h6hv5c_EOImpl.Outbound_inout_union(OutboundCorba_h6hv5c_EOImpl.java:
59)
        at
weblogic.qa.tests.wtc.corba.outbound.OutboundCorba_h6hv5c_EOImpl_WLSkel.invoke(ILweblogic.rmi.spi.InboundRequest;Lweblo
gic.rmi.spi.OutboundResponse;Ljava.lang.Object;)Lweblogic.rmi.spi.OutboundResponse;(Unknown Source)
        at weblogic.rmi.internal.activation.ActivatableServerRef.invoke(ActivatableServerRef.java:85)
        at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:393)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
        at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:389)
        at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:56)
        at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:903)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
        at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)

Seems it's an unmarshal issue.
  
CONFIGURATION:
WebLogic Server 9.0 with Service Pack 1
JDK150_04
BEA Tuxedo, Version 8.1, 32-bit, Patch Level 185
Windows 2000

Solution

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms