Uploaded image for project: 'Nutch'
  1. Nutch
  2. NUTCH-142

NutchConf should use the thread context classloader

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.7
    • Fix Version/s: 0.7.2, 0.8
    • Component/s: None
    • Labels:
      None

      Description

      Right now NutchConf uses it's own static classloader which is evil in a J2EE scenario.

      This is simply fixed. Line 52:

      private ClassLoader classLoader = NutchConf.class.getClassLoader();

      Should be:

      private ClassLoader classLoader = Thread.currentThread().getContextClassLoader();

      This means no matter where Nutch classes are loaded from, it will use the correct J2EE classloader to try to find configuration files (ie from WEB-INF/classes).

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              mike@atlassian.com Mike Cannon-Brookes
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: