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

Customized user logging fails in DUCC Job Driver

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2.0-Ducc
    • Component/s: DUCC
    • Labels:
      None

      Description

      When a user specifies a custom logging configurator via -Djava.util.logging.config.class it fails in the JD as its ToLog class creates a logger using the DUCC classpath which does not have the users class.

        Activity

        Hide
        burn Burn Lewis added a comment -

        The problem was not the ToLog class - apparently the java logging classes are loaded from the thread-context classloader, not that of the calling class. So when using reflection the thread-context classloader must be set for the newInstance method as well as the invoke method.

        Show
        burn Burn Lewis added a comment - The problem was not the ToLog class - apparently the java logging classes are loaded from the thread-context classloader, not that of the calling class. So when using reflection the thread-context classloader must be set for the newInstance method as well as the invoke method.
        Hide
        lou.degenaro Lou DeGenaro added a comment -

        3 more classes were using newInstance for JobDriver in the container project:

        > ProxyDeployableGeneration
        > ProxyJobDriverErrorHandler
        > ProxyUserErrorStringify

        Change them to employ ContextSwitch.construct() so as to employ Thread ContextClassLoader.

        Show
        lou.degenaro Lou DeGenaro added a comment - 3 more classes were using newInstance for JobDriver in the container project: > ProxyDeployableGeneration > ProxyJobDriverErrorHandler > ProxyUserErrorStringify Change them to employ ContextSwitch.construct() so as to employ Thread ContextClassLoader.
        Hide
        burn Burn Lewis added a comment -

        Code was in RC2 but its Jira was wrongly marked

        Show
        burn Burn Lewis added a comment - Code was in RC2 but its Jira was wrongly marked

          People

          • Assignee:
            burn Burn Lewis
            Reporter:
            burn Burn Lewis
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development