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

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

Solutions on the web

via JIRA by Robert Stiller, 1 year ago
can't serialize class Type
via Google Groups by Nicolae Namolovan, 2 years ago
can't serialize class com.mongodb.DBRef
via Google Groups by Nicolae Namolovan, 2 years ago
can't serialize class com.mongodb.DBRef
via Stack Overflow by Masti
, 2 years ago
can't serialize class test.mongo.foo.DummyObject
via GitHub by graemerocher
, 2 years ago
can't serialize class grails.plugins.springsecurity.SpringSecurityService
via spring.io by Unknown author, 2 years ago
java.lang.IllegalArgumentException: can't serialize class Type
at org.bson.BSONEncoder._putObjectField(BSONEncoder.java:213)
at org.bson.BSONEncoder.putObject(BSONEncoder.java:123)
at org.bson.BSONEncoder._putObjectField(BSONEncoder.java:173)
at org.bson.BSONEncoder.putObject(BSONEncoder.java:123)
at org.bson.BSONEncoder.putObject(BSONEncoder.java:69)
at com.mongodb.OutMessage.putObject(OutMessage.java:189)
at com.mongodb.OutMessage._appendQuery(OutMessage.java:62)
at com.mongodb.OutMessage.query(OutMessage.java:39)
at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:293)
at com.mongodb.DB.command(DB.java:152)
at com.mongodb.DBCollection.getCount(DBCollection.java:760)
at com.mongodb.DBCollection.getCount(DBCollection.java:731)
at com.mongodb.DBCollection.count(DBCollection.java:697)
at org.springframework.data.document.mongodb.repository.QueryDslMongoRepository.count(QueryDslMongoRepository.java:151)
at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:616)
at org.springframework.data.repository.support.RepositoryFactorySupport$QueryExecuterMethodInterceptor.executeMethodOn(RepositoryFactorySupport.java:356)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at undefined.$Proxy18.count(Unknown Source)

Users with the same issue

You are the first who have seen this exception.

Write tip

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