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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via Spring JIRA by Alex_M, 1 year ago
can't serialize class Day
via Spring JIRA by Alex_M, 1 year ago
can't serialize class Day
via GitHub by graemerocher
, 2 years ago
can't serialize class com.inkwire.system.TaskStatus
via Stack Overflow by 3x14159265
, 2 years ago
can't serialize class scala.Enumeration$Val
via Stack Overflow by user1236874
, 2 years ago
can't serialize class CustomObject
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)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 4 months ago
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.