title: Jackson deserializing Optional throws NoSuchFieldError
body: <p>I developing a Spring Boot application and I tried to include an <code>Optional&lt;String&gt;</code> (<code>java.lang</code>) field in one of my models, so If the <code>@RestController</code> I am using with won't get such a field, it will include it as an <code>Optional.empty()</code>. Every time I call the method via POST I get a <code>java.lang.NoSuchFieldError: _valueInstantiator</code> exception. I started experimenting and made a stripped down version of the deserializer, that still gives me the error:</p>
  
  <p>The model:</p>
  
  <pre><code>import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
  import com.fasterxml.jackson.annotation.JsonInclude;
  
  import java.util.Optional;
  
  @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
  @JsonIgnoreProperties(ignoreUnknown = true)
  public class Test {
      private int id;
      private String name;
      private Optional&lt;String&gt; nickname;
  
      public int getId() {
          return id;
      }
  
      public void setId(int id) {
          this.id = id;
      }
  
      public String getName() {
          return name;
      }
  
      public void setName(String name) {
          this.name = name;
      }
  
      public Optional&lt;String&gt; getNickname() {
          return nickname;
      }
  
      public void setNickname(Optional&lt;String&gt; nickname) {
          this.nickname = nickname;
      }
  }
  </code></pre>
  
  <p>And the deserialization snippet:</p>
  
  <pre><code>ObjectMapper mapper = new ObjectMapper();
  Jdk8Module j = new Jdk8Module();
  j.configureAbsentsAsNulls(true);//tried using true and false too
  mapper.registerModule(j);
  mapper.setSerializationInclusion(JsonInclude.Include.USE_DEFAULTS);
  mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
  
  
  mapper.readValue("{\"id\":1, \"name\":\"a\", \"nickname\":\"asd\"}", Test.class);
  </code></pre>
  
  <p>If I don't include the <code>nickname</code> property at all, it still gives me the same error.
  <a href="https://i.stack.imgur.com/1S6Qo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/1S6Qo.jpg" alt="enter image description here"></a></p>
  
  <p>Jackson versions:</p>
  
  <pre><code>&lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;1.5.8.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  </code></pre>
  
  <p>...</p>
  
  <pre><code>&lt;!-- https://mvnrepository.com/artifact/com.fasterxml.jackson.datatype/jackson-datatype-jdk8 --&gt;
  &lt;dependency&gt;
      &lt;groupId&gt;com.fasterxml.jackson.datatype&lt;/groupId&gt;
      &lt;artifactId&gt;jackson-datatype-jdk8&lt;/artifactId&gt;
      &lt;version&gt;2.9.2&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>Tried it with this controller (same exception):</p>
  
  <pre><code>  @RequestMapping(value = "/test",method = RequestMethod.POST)
      public Test test(
              @RequestBody Test test
      ) {
          return test;//&lt;-- did not even reach the breakpoint here
      }
  </code></pre>