无法序列化com.google.code.morphia.mapping.Mapper类

时间:2014-02-20 11:45:02

标签: java mongodb morphia

我使用morphia在Mongodb中进行操作...... 当我尝试将迭代器插入db

时,我收到以下错误
Exception in thread "main" java.lang.IllegalArgumentException: can't serialize class com.google.code.morphia.mapping.Mapper
    at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:270)
    at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174)
    at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:120)
    at com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:27)
    at com.mongodb.OutMessage.putObject(OutMessage.java:289)
    at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:261)
    at com.mongodb.DBApiLayer$MyCollection.insert(DBApiLayer.java:226)
    at com.mongodb.DBCollection.insert(DBCollection.java:147)
    at com.mongodb.DBCollection.insert(DBCollection.java:90)
    at com.google.code.morphia.DatastoreImpl.insert(DatastoreImpl.java:703)
    at com.google.code.morphia.DatastoreImpl.insert(DatastoreImpl.java:681)
    at com.google.code.morphia.DatastoreImpl.insert(DatastoreImpl.java:676)
    at DB_Write.writeData(DB_Write.java:35)
    at MongoOperation.main(MongoOperation.java:17)

帮帮我.. 提前谢谢..

0 个答案:

没有答案