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

Classloader change to ORB prevents initialization of distributed ORB in Web App

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 7u55
    • core-libs
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.7.0_55"
      Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      EXTRA RELEVANT SYSTEM CONFIGURATION :
      The web application includes and uses JacORB. It is running on Tomcat. So knowledge of servlet container class loaders would be important.

      A DESCRIPTION OF THE PROBLEM :
      The web application includes JacORB as the COBRA implementation and it is bundled within a WAR. When starting the application, it cannot find the provided ORB implementation because it tries to find it from the system classloader, instead of the Web Application classloader.

      This relates to how Servlet Container class loaders work.

      http://tomcat.apache.org/tomcat-7.0-doc/class-loader-howto.html

      It seems that the a change to the ORB caused this problem here:
      http://hg.openjdk.java.net/jdk7u/jdk7u60/corba/rev/a8d27c3fc4e4

      Users of Application Servers (such as Glassfish) are also reporting this problem:
      https://java.net/jira/browse/GLASSFISH-21047

      REGRESSION. Last worked in version 7u51

      ADDITIONAL REGRESSION INFORMATION:
      java version "1.7.0_55"
      Java(TM) SE Runtime Environment (build 1.7.0_55-b13)
      Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Place a web application into any servlet container and provide a CORBA implementation (such as JacORB) under the WEB-INF/lib and try to initialize it.

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      It should find the class provided with the web application.
      ACTUAL -
      The class is not found and it fails to initialize the default ORB (which we don't want).

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation org.jacorb.orb.ORBSingleton vmcid: 0x0 minor code: 0 completed: No
      at org.omg.CORBA.ORB.create_impl_with_systemclassloader(Unknown Source)
      at org.omg.CORBA.ORB.init(Unknown Source)
      at org.jacorb.orb.ORBSingleton.configure(ORBSingleton.java:141)
      at org.jacorb.orb.ORB.configure(ORB.java:277)
      at org.jacorb.orb.ORB.set_parameters(ORB.java:1590)
      at org.omg.CORBA.ORB.init(Unknown Source)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      CUSTOMER SUBMITTED WORKAROUND :
      The only work arounds that I know about are:
      * Have users place the ORB implementation and dependencies into the java.endoresed.libs directory.
      * Not use Java 7 u 55, Java 8 u 5 or Java 6 u 45.

            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: