title: com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: UnrecognizedPropertyException and Unrecognized field
body: <p>I am new to JSON and I am trying to apply the simplest JSON concept from:
  <a href="https://github.com/FasterXML/jackson-databind" rel="nofollow">https://github.com/FasterXML/jackson-databind</a></p>
  
  <p>It is straight forward and very easy to follow. The explanation makes sense.
  The POJO is clean and doesn't have much.
  The mapper should do the job but it isn't.</p>
  
  <p>so I have the following code:</p>
  
  <pre><code>public static void main(String[] args) throws Exception {
      ObjectMapper objectMapper = new ObjectMapper();
      MyValue value = objectMapper.readValue("{\"name\":\"Bob\", \"age\":13}", MyValue.class);
      System.out.println("- value.getName = ["+value.getName()+"] ");
      System.out.println("- value.getAge = ["+value.getAge()+"] ");           
  } // main()
  
  
  public class MyValue {
      private String name;
      private int age;
  
      public String getName() {
          return name;
      }
      public void setName(String name) {
          this.name = name;
      }
  
      public int getAge() {
          return age;
      }
      public void setAge(int age) {
          this.age = age;
      }
  
      // Constructor
      public MyValue() {
      }
  
  } // MyValue Class
  </code></pre>
  
  <p>when I run it, it generates the following exception:</p>
  
  <pre><code>Exception in thread "main" com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class com.csc.cloud.cp.service.solarwinds.orion.impl.SolarWindsOrionServiceImpl$MyValue]: can not instantiate from JSON object (need to add/enable type information?)
   at [Source: {"name":"Bob", "age":13}; line: 1, column: 2]
  </code></pre>
  
  <p>even though I have my default MyValue() constructor in there.</p>
  
  <p>So when I add the following Annotation to the MyValue Class:</p>
  
  <pre><code>// Constructor
  @JsonCreator 
      public MyValue() {
  }
  </code></pre>
  
  <p>I get the following exception</p>
  
  <pre><code>Exception in thread "main" com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException: Unrecognized field "name" (class com.csc.cloud.cp.service.solarwinds.orion.impl.SolarWindsOrionServiceImpl), not marked as ignorable (0 known properties: ])
   at [Source: {"name":"Bob", "age":13}; line: 1, column: 10] (through reference chain: com.csc.cloud.cp.service.solarwinds.orion.impl.SolarWindsOrionServiceImpl["name"])
      at com.fasterxml.jackson.databind.exc.UnrecognizedPropertyException.from(UnrecognizedPropertyException.java:51)
  </code></pre>
  
  <p>I am pulling my hair. Please HELP !!!</p>
  
  <p>Thank you</p>