Hadoop Map/Reduce
  1. Hadoop Map/Reduce
  2. MAPREDUCE-3965

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 0.23.0, 1.0.0, 2.0.0-alpha
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      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.

        Activity

        Steve Loughran created issue -
        Steve Loughran made changes -
        Field Original Value New Value
        Affects Version/s 1.0.0 [ 12318240 ]
        Environment Setting up a job under Groovy Setting up a job under Groovy, OSX10.7, job started by ant's <java> with fork==true
        Steve Loughran made changes -
        Affects Version/s 0.23.0 [ 12315570 ]
        Affects Version/s 0.24.0 [ 12317654 ]
        Allen Wittenauer made changes -
        Affects Version/s 2.0.0-alpha [ 12320354 ]
        Affects Version/s 0.24.0 [ 12317654 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Steve Loughran
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development