4 Replies Latest reply on Apr 10, 2019 7:45 AM by tomekadamski

    Issue introduced with Wildfly 11 openjdk-orb module

    alban5650

      Hi,

       

      I am trying to move our application from Wildfly 10.1.0 to 11.0.0 but I am running into an issue with the openjdk-orb-8.0.8.Final.jar version that is bundled with Wildfly 11.

      Our code is failing when calling the NamingContext.resolve method:

      final NamingContext rootContext = NamingContextHelper.narrow(orb.resolve_initial_references("NameService"));
      final NameComponent name[] = ...;
      final org.omg.CORBA.Object corbaObject = rootContext.resolve(name);
      
      

       

      And we receive the following exception:

      nestedException.message="String index out of range: -1" nestedException.stackTrace="java.lang.StringIndexOutOfBoundsException: String index out of range: -1

          at java.lang.String.substring(String.java:1967)

          at com.sun.corba.se.impl.util.RepositoryId.init(RepositoryId.java:353)

          at com.sun.corba.se.impl.util.RepositoryId.<init>(RepositoryId.java:311)

          at com.sun.corba.se.impl.util.RepositoryIdCache.getId(RepositoryIdCache.java:102)

          at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:740)

          at com.sun.corba.se.impl.encoding.CDRInputStream_1_0.read_Object(CDRInputStream_1_0.java:710)

          at com.sun.corba.se.impl.encoding.CDRInputStream.read_Object(CDRInputStream.java:231)

          at org.omg.CORBA.ObjectHelper.read(ObjectHelper.java:75)

          at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:245)

       

       

      I have traced the issue with the following commit: Correct classname creation for IDL based types · jboss/openjdk-orb@7927a8e · GitHub  

      In openjdk-orb/src/share/classes/com/sun/corba/se/impl/util/RepositoryId.java class.

       

      I have added a debug to this class and I can see that the aRepId passed to the RepositoryId init(String aRepId) method is equal to: "IDL:LoginController:1.0".

      There needs to be a check on whether on the presence of the "/" in the typeString (in my insteance "LoginController") before calling typeString.substring(0,typeString.indexOf("/")) at line 353

       

      Would it be safe to downgrade to the previous Wildfly 10.1.0 openjdk-orb-8.0.6.Final.jar or should I patch manually the existing 8.0.8 version?

       

      Thanks,

      Alban