Announcement Announcement Module
Collapse
No announcement yet.
mongodb mapreduce parseCounts classcastexception Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • mongodb mapreduce parseCounts classcastexception

    Hi, all! I need to use documents grouping, but my db is sharded.

    I try use mapreduce:

    Code:
    MapReduceResults<ValueObject> results =  mongoOperations.mapReduce(query, table, functionMap, functionReduce, ValueObject.class);
    But I get exception:

    Code:
    java.lang.Long cannot be cast to java.lang.Integer
    java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.Integer
    	at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.parseCounts(MapReduceResults.java:125) ~[spring-data-mongodb-1.1.0.RELEASE.jar:na]
    	at org.springframework.data.mongodb.core.mapreduce.MapReduceResults.<init>(MapReduceResults.java:54) ~[spring-data-mongodb-1.1.0.RELEASE.jar:na]
    	at org.springframework.data.mongodb.core.MongoTemplate.mapReduce(MongoTemplate.java:1105) ~[spring-data-mongodb-1.1.0.RELEASE.jar:na]
    	at org.springframework.data.mongodb.core.MongoTemplate.mapReduce(MongoTemplate.java:1071) ~[spring-data-mongodb-1.1.0.RELEASE.jar:na]
    I did not find anyone post by this theme...
Working...
X