java.lang.IllegalArgumentException: can't serialize class Day

Spring JIRA | Alex_M | 3 years ago
  1. 0

    spring-data-mongodb - 1.3.3.RELEASE mongo-java-driver - 2.11.3 Unable to execute query using void org.springframework.data.mongodb.core.MongoTemplate.executeQuery(Query query, String collectionName, DocumentCallbackHandler dch) with queries which contain Criteries with Enums. {code:title=Stack trace}: java.lang.IllegalArgumentException: can't serialize class Day at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:273) at org.bson.BasicBSONEncoder.putIterable(BasicBSONEncoder.java:298) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:237) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:229) 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.OutMessage.writeQuery(OutMessage.java:211) at com.mongodb.OutMessage.query(OutMessage.java:84) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:285) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DBCursor._check(DBCursor.java:368) at com.mongodb.DBCursor._hasNext(DBCursor.java:459) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.springframework.data.mongodb.core.MongoTemplate.executeQueryInternal(MongoTemplate.java:1701) at org.springframework.data.mongodb.core.MongoTemplate.executeQuery(MongoTemplate.java:377) at org.springframework.data.mongodb.core.MongoTemplate.executeQuery(MongoTemplate.java:350) {code} Please find little unit test in attachment

    Spring JIRA | 3 years ago | Alex_M
    java.lang.IllegalArgumentException: can't serialize class Day
  2. 0

    spring-data-mongodb - 1.3.3.RELEASE mongo-java-driver - 2.11.3 Unable to execute query using void org.springframework.data.mongodb.core.MongoTemplate.executeQuery(Query query, String collectionName, DocumentCallbackHandler dch) with queries which contain Criteries with Enums. {code:title=Stack trace}: java.lang.IllegalArgumentException: can't serialize class Day at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:273) at org.bson.BasicBSONEncoder.putIterable(BasicBSONEncoder.java:298) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:237) at org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174) at org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:229) 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.OutMessage.writeQuery(OutMessage.java:211) at com.mongodb.OutMessage.query(OutMessage.java:84) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:285) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DBCursor._check(DBCursor.java:368) at com.mongodb.DBCursor._hasNext(DBCursor.java:459) at com.mongodb.DBCursor.hasNext(DBCursor.java:484) at org.springframework.data.mongodb.core.MongoTemplate.executeQueryInternal(MongoTemplate.java:1701) at org.springframework.data.mongodb.core.MongoTemplate.executeQuery(MongoTemplate.java:377) at org.springframework.data.mongodb.core.MongoTemplate.executeQuery(MongoTemplate.java:350) {code} Please find little unit test in attachment

    Spring JIRA | 3 years ago | Alex_M
    java.lang.IllegalArgumentException: can't serialize class Day
  3. 0

    response too long: 572544067

    GitHub | 3 years ago | yegor256
    java.lang.IllegalArgumentException: response too long: 572544067
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Query with Key-List results in: java.lang.IllegalArgumentException: can't serialize class com.google.code.morphia.Key

    GitHub | 3 years ago | michelvocks
    java.lang.IllegalArgumentException: can't serialize class com.google.code.morphia.Key
  6. 0

    What does "response too long" means in MongoDB Java driver?

    Stack Overflow | 3 years ago | yegor256
    java.lang.IllegalArgumentException: response too long: 1912733750 at com.mongodb.Response.<init>(Response.java:47)

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      can't serialize class Day

      at org.bson.BasicBSONEncoder._putObjectField()
    2. MongoDB Java Driver
      DBCursor.hasNext
      1. org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:273)
      2. org.bson.BasicBSONEncoder.putIterable(BasicBSONEncoder.java:298)
      3. org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:237)
      4. org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174)
      5. org.bson.BasicBSONEncoder._putObjectField(BasicBSONEncoder.java:229)
      6. org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:174)
      7. org.bson.BasicBSONEncoder.putObject(BasicBSONEncoder.java:120)
      8. com.mongodb.DefaultDBEncoder.writeObject(DefaultDBEncoder.java:27)
      9. com.mongodb.OutMessage.putObject(OutMessage.java:289)
      10. com.mongodb.OutMessage.writeQuery(OutMessage.java:211)
      11. com.mongodb.OutMessage.query(OutMessage.java:84)
      12. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:285)
      13. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273)
      14. com.mongodb.DBCursor._check(DBCursor.java:368)
      15. com.mongodb.DBCursor._hasNext(DBCursor.java:459)
      16. com.mongodb.DBCursor.hasNext(DBCursor.java:484)
      16 frames
    3. Spring Data MongoDB - Core
      MongoTemplate.executeQuery
      1. org.springframework.data.mongodb.core.MongoTemplate.executeQueryInternal(MongoTemplate.java:1701)
      2. org.springframework.data.mongodb.core.MongoTemplate.executeQuery(MongoTemplate.java:377)
      3. org.springframework.data.mongodb.core.MongoTemplate.executeQuery(MongoTemplate.java:350)
      3 frames