Uploaded image for project: 'Hadoop Map/Reduce'
  1. Hadoop Map/Reduce
  2. MAPREDUCE-3965

JobConf.findContainingJar NPEs if it can't find the classloader of a class

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 0.23.0, 1.0.0, 2.0.0-alpha
    • None
    • None
    • None
    • Setting up a job under Groovy, OSX10.7, job started by ant's <java> with fork==true

    Description

      I never knew that classes may not have classloaders, but it turns out they can -in which case Object.getClass().getClassLoader() will be null "This method will return null in such implementations if this class was loaded by the bootstrap class loader.""

      When this (rare) situation arises, JobConf.findContainingJar() NPEs, when failing with a slightly more useful error message would be preferred.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stevel@apache.org Steve Loughran
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: