title: MarshallingException when trying to mapping a Class to a document on playframwork
body: <p>I'm writing a Play 2.3.2 application in Java and I'm using Jongo as driver for MongoDB.
  After do some changes to my code my application gives me runtime errors.
  The error is given to the fourth lines of the getUser method.
  This is my used code:</p>
  
  <pre><code>public static User getUser(String email) {
          Jongo jongo = MongoFactory.getJongo();
          MongoCollection users = jongo.getCollection(USERS_COLLECTION);
          return users.findOne("{email: '"+email +"'}").as(User.class);
  }
  </code></pre>
  
  <p>After adding the <code>Module</code> class to <code>Company</code>, the method <code>as</code> in the lines above was unable to unmarshall the result of <code>find</code>. </p>
  
  <pre><code>public class User {
      //... some fields ...
      private Company company;
      //... constructor using all fieds ...
      //... getters and setters for all fields ...
  }
  
  public class Company {
      //... some fields ...
      private List&lt;Module&gt; modules;
      //... constructor using all fieds ...
      //... getters and setters for all fields ...
  
      public class Module {
          private String name;
          private Date createTime;
          private Date expireTime;
          private Map&lt;String, Object&gt; options;
  
          //... constructor using all fieds ...
          //... getters and setters for all fields ...
      }
  
  }
  </code></pre>
  
  <p>And this are the runtime-error :</p>
  
  <pre><code>    play.api.Application$$anon$1: Execution exception[[MarshallingException: Unable to unmarshall result to class bdrim.models.User from content { "_id" : { "$oid" : "53beb050d10e5ba896d8d912"} , "email" : "alberto@zero12.it" , "name" : "Alberto" , "surname" : "Simioni" , "password" : "$2a$10$E4hi2giYm4LnYq5e3TrfheGhsjtydWtl3GR/87.tUIA1Xs8MtY9kS" , "company" : { "name" : "Zero12 s.r.l." , "vat" : "04631710284" , "telephoneNumber" : "0499414411" , "country" : "Italy" , "city" : "Carmignano" , "postalCode" : "35010" , "address" : "Via spessa 25/c" , "modules" : [ { "name" : "mailchimp" , "createTime" : { "$date" : "2014-10-15T12:19:12.416Z"} , "expireTime" : { "$date" : "2015-10-15T12:19:12.416Z"} , "options" : { "listid" : "6d7e5ad5b8" , "apikey" : "9fe7bcf4d2ffff92306cf1de28acc9ea-us9"}}]} , "role" : "Super Administrator" , "idShop" : "Shop2"}]]
          at play.api.Application$class.handleError(Application.scala:296) ~[play_2.11-2.3.2.jar:2.3.2]
          at play.api.DefaultApplication.handleError(Application.scala:402) [play_2.11-2.3.2.jar:2.3.2]
          at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.11-2.3.2.jar:2.3.2]
          at play.core.server.netty.PlayDefaultUpstreamHandler$$anonfun$3$$anonfun$applyOrElse$4.apply(PlayDefaultUpstreamHandler.scala:320) [play_2.11-2.3.2.jar:2.3.2]
          at scala.Option.map(Option.scala:145) [scala-library-2.11.2.jar:na]
  Caused by: org.jongo.marshall.MarshallingException: Unable to unmarshall result to class bdrim.models.User from content { "_id" : { "$oid" : "53beb050d10e5ba896d8d912"} , "email" : "alberto@zero12.it" , "name" : "Alberto" , "surname" : "Simioni" , "password" : "$2a$10$E4hi2giYm4LnYq5e3TrfheGhsjtydWtl3GR/87.tUIA1Xs8MtY9kS" , "company" : { "name" : "Zero12 s.r.l." , "vat" : "04631710284" , "telephoneNumber" : "0499414411" , "country" : "Italy" , "city" : "Carmignano" , "postalCode" : "35010" , "address" : "Via spessa 25/c" , "modules" : [ { "name" : "mailchimp" , "createTime" : { "$date" : "2014-10-15T12:19:12.416Z"} , "expireTime" : { "$date" : "2015-10-15T12:19:12.416Z"} , "options" : { "listid" : "6d7e5ad5b8" , "apikey" : "9fe7bcf4d2ffff92306cfxxxxxacc9ea-us9"}}]} , "role" : "Super Administrator" , "idShop" : "Shop2"}
      at org.jongo.marshall.jackson.JacksonEngine.unmarshall(JacksonEngine.java:45) ~[jongo-1.1.jar:na]
      at org.jongo.ResultHandlerFactory$UnmarshallingResultHandler.map(ResultHandlerFactory.java:43) ~[jongo-1.1.jar:na]
      at org.jongo.FindOne.map(FindOne.java:51) ~[jongo-1.1.jar:na]
      at org.jongo.FindOne.as(FindOne.java:46) ~[jongo-1.1.jar:na]
      at bdrim.models.UsersDao.getUser(UsersDao.java:151) ~[classes/:na]
  Caused by: com.fasterxml.jackson.databind.JsonMappingException: No suitable constructor found for type [simple type, class bdrim.models.Company$Module]: can not instantiate from JSON object (need to add/enable type information?)
   at [Source: de.undercouch.bson4jackson.io.LittleEndianInputStream@12adfe45; pos: 361] (through reference chain: bdrim.models.User["company"]-&gt;bdrim.models.Company["modules"])
      at com.fasterxml.jackson.databind.JsonMappingException.from(JsonMappingException.java:164) ~[jackson-databind-2.4.1.jar:2.4.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializerBase.deserializeFromObjectUsingNonDefault(BeanDeserializerBase.java:1065) ~[jackson-databind-2.4.1.jar:2.4.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserializeFromObject(BeanDeserializer.java:268) ~[jackson-databind-2.4.1.jar:2.4.1]
      at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:124) ~[jackson-databind-2.4.1.jar:2.4.1]
      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:232) ~[jackson-databind-2.4.1.jar:2.4.1]
  </code></pre>