title: NullPointerException in ObjectMapper in Spark Cluster Mode on AWS EMR
body: <p>I am getting <code>nullpointer</code> exception in this line (running spark in cluster mode (yarn) on aws emr) but runs fine in client mode (with master as local)</p>
  
  <pre><code>Map&lt;String, Object&gt; json = (Map&lt;String, Object&gt;) mapper.readValue(line, Map.class);
  </code></pre>
  
  <p>This is the stacktrace of the executor:</p>
  
  <pre><code>18/04/17 12:33:16 ERROR executor.Executor: Exception in task 0.2 in stage 0.0 (TID 4)
  java.lang.NullPointerException
      at com.fasterxml.jackson.databind.util.LRUMap.get(LRUMap.java:47)
      at com.fasterxml.jackson.databind.type.TypeFactory._fromClass(TypeFactory.java:707)
      at com.fasterxml.jackson.databind.type.TypeFactory._constructType(TypeFactory.java:387)
      at com.fasterxml.jackson.databind.type.TypeFactory.constructType(TypeFactory.java:354)
      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2161)
  </code></pre>
  
  <p>I am using the following dependency:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
    &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
    &lt;version&gt;2.9.5&lt;/version&gt;
    &lt;scope&gt;compile&lt;/scope&gt;
  &lt;/dependency&gt;
  </code></pre>