Uploaded image for project: 'UIMA'
  1. UIMA
  2. UIMA-1631

UimaBootstrap Loader approach fails to work for classes loaded by logger (and maybe other parts of Java)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.3
    • Tools
    • None

    Description

      The bootstrap loader is creating a URLClassLoader whose parent is the application class loader - also the one obtained from ClassLoader.getSystemClassLoader() method. The Logger configuration is defined to load classes uses the application class loader, and fails to find any of the classes made available by the bootstrap class loader.

      An attempted fix that used the -Djava.system.class.loader failed to work for IBM Java 5 because that Java doesn't use the loader returned by ClassLoader.getSystemClassLoader() to load the logger classes.

      Fix this by not creating a new class loader, and just adding the new jars and directories to the current application class loader, using reflection to enable accessing the addUrl method. This approach presumes that the application class loader is a subclass of URLClassLoader, which seems to be true at least for Sun and IBM Javas, launched with the normal java command.

      Attachments

        Activity

          People

            schor Marshall Schor
            schor Marshall Schor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: