When I insert a List into mongodb, there is a problem:
Exception in thread \"main\" java.lang.IllegalArgumentException: can\'t serialize class mongodb.Person
The problem here not in "implements Serializable". The problem is that object not converted in the DBObject.
Possible solution:
import com.fasterxml.jackson.databind.ObjectMapper;
import com.mongodb.*;
....
ObjectMapper mapper = new ObjectMapper();
DBObject dboJack = mapper.convertValue(new Person("Jack"), BasicDBObject.class);
...