title: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot construct instance of `java.time.LocalDate
body: <p>I'm facing an error while deserialize the string to object.</p>
  
  <blockquote>
    <p>org.opentest4j.MultipleFailuresError: Multiple Failures (2 failures)
      com.fasterxml.jackson.databind.exc.InvalidDefinitionException: Cannot
    construct instance of <code>java.time.LocalDate</code> (no Creators, like default
    construct, exist): no String-argument constructor/factory method to
    deserialize from String value ('2020-05-20')  at [Source: (String)</p>
  </blockquote>
  
  <p>JSON</p>
  
  <pre><code> {
         "studentId":57,
         "JoinedDate":"31-12-2019",
         "DOB":"08-06-1998"  
  
      }
  </code></pre>
  
  <p>Model</p>
  
  <pre><code>public class Student{
  
      private long studentId ;
  
      private LocalDate JoinedDate;
  
      private LocalDate DOB ;
  
      public long getStudentId() {
          return studentId;
      }
  
      public void setStudentId(long studentId) {
          this.studentId = studentId;
      }
  
      public LocalDate getJoinedDate() {
          return JoinedDate;
      }
  
      public void setJoinedDate(LocalDate joinedDate) {
          JoinedDate = joinedDate;
      }
  
      public LocalDate getDOB() {
          return DOB;
      }
  
      public void setDOB(LocalDate dOB) {
          DOB = dOB;
      }
  </code></pre>
  
  <p>Unit Test Class</p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(classes = Main.class)
  @WebAppConfiguration
  public class StudentTest{
  
  
  private Student student;
  private ObjectMapper jsonObjectMapper;
  @Before
  public void setUp() throws IOException {
  
      jsonObjectMapper = new ObjectMapper();
      jsonObjectMapper.setDateFormat(new SimpleDateFormat("dd-MM-yyyy"));
      studentJson = IOUtils.toString(getClass().getResourceAsStream(CommonTestConstants.StudentPath+ "/Student.json"));
  
  
  student = jsonObjectMapper.readValue(studentJson , Student.class);
  }
  </code></pre>
  
  <p>Any one please advise</p>
  
  <p>Reference 
  <a href="https://stackoverflow.com/questions/50540403/cannot-construct-instance-of-java-time-zoneddatetime-no-creators-like-defaul">Cannot construct instance of `java.time.ZonedDateTime` (no Creators, like default construct, exist)</a></p>
  
  <p><a href="https://stackoverflow.com/questions/62233024/unable-to-deserialize-jackson-localdate-time-junit?noredirect=1#comment110065384_62233024">Unable to Deserialize - Jackson LocalDate/Time - JUnit</a></p>