Announcement Announcement Module
Collapse
No announcement yet.
1.0.0.M5 -> 1.0.0.RC1 updateFirst failed Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 1.0.0.M5 -> 1.0.0.RC1 updateFirst failed

    In RC1 MongoSimpleTypes, DBObject is added as simple type also somehow. When MongoTemplate.updateFirst tries to convert update object, java pojo is not converted into JSON object.

    line:815-819
    DBObject updateObj = update.getUpdateObject();

    for (String key : updateObj.keySet()) {
    updateObj.put(key, mongoConverter.convertToMongoType(updateObj.get(ke y)));
    }


    My unit tests reported following exceptions:
    java.lang.RuntimeException: json can't serialize type : class com.klip.queue.db.model.FacebookAppRequestInfo
    at com.mongodb.util.JSON.serialize(JSON.java:261)
    at com.mongodb.util.JSON.serialize(JSON.java:210)
    at com.mongodb.util.JSON.serialize(JSON.java:141)
    at com.mongodb.util.JSON.serialize(JSON.java:141)
    at com.mongodb.util.JSON.serialize(JSON.java:58)
    at com.mongodb.BasicDBObject.toString(BasicDBObject.j ava:84)
    at java.lang.String.valueOf(String.java:2826)
    at java.lang.StringBuilder.append(StringBuilder.java: 115)
    at org.springframework.data.mongodb.core.MongoTemplat e$12.doInCollection(MongoTemplate.java:822)
    at org.springframework.data.mongodb.core.MongoTemplat e$12.doInCollection(MongoTemplate.java:808)
    at org.springframework.data.mongodb.core.MongoTemplat e.execute(MongoTemplate.java:368)
    at org.springframework.data.mongodb.core.MongoTemplat e.doUpdate(MongoTemplate.java:808)
    at org.springframework.data.mongodb.core.MongoTemplat e.updateFirst(MongoTemplate.java:790)


    any one can take a look and fix the issue?

    thanks

    Eric
Working...
X