title: JsonMappingException: No suitable constructor found for type [simple type, class ]: can not instantiate from JSON object
body: <p>I am getting the following error when trying to get a JSON request and process it:</p>
  
  <blockquote>
    <p>org.codehaus.jackson.map.JsonMappingException: No suitable constructor found for type [simple type, class com.myweb.ApplesDO]: can not instantiate from JSON object (need to add/enable type information?)</p>
  </blockquote>
  
  <p>Here is the JSON I am trying to send:</p>
  
  <pre class="lang-json prettyprint-override"><code>{
    "applesDO" : [
      {
        "apple" : "Green Apple"
      },
      {
        "apple" : "Red Apple"
      }
    ]
  }
  </code></pre>
  
  <p>In Controller, I have the following method signature:</p>
  
  <pre><code>@RequestMapping("showApples.do")
  public String getApples(@RequestBody final AllApplesDO applesRequest){
      // Method Code
  }
  </code></pre>
  
  <p>AllApplesDO is a wrapper of ApplesDO :</p>
  
  <pre><code>public class AllApplesDO {
  
      private List&lt;ApplesDO&gt; applesDO;
  
      public List&lt;ApplesDO&gt; getApplesDO() {
          return applesDO;
      }
  
      public void setApplesDO(List&lt;ApplesDO&gt; applesDO) {
          this.applesDO = applesDO;
      }
  }
  </code></pre>
  
  <p>ApplesDO:</p>
  
  <pre><code>public class ApplesDO {
  
      private String apple;
  
      public String getApple() {
          return apple;
      }
  
      public void setApple(String appl) {
          this.apple = apple;
      }
  
      public ApplesDO(CustomType custom){
          //constructor Code
      }
  }
  </code></pre>
  
  <p>I think that Jackson is unable to convert JSON into Java objects for subclasses. Please help with the configuration parameters for Jackson to convert JSON into Java Objects. I am using Spring Framework.</p>
  
  <p>EDIT: Included the major bug that is causing this problem in the above sample class - Please look accepted answer for solution.</p>