java.lang.RuntimeException: json can't serialize type : class database.models.security.User

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 yami.veranes, 1 year ago
json can't serialize type : class database.models.security.User
via Spring JIRA by Agoston Horvath, 1 year ago
via Spring JIRA by Agoston Horvath, 1 year ago
via GitHub by ranadeepak
, 1 year ago
json can't serialize type : class com.pb.lunchandlearn.domain.TrainingStatus
via GitHub by pdirksen
, 1 year ago
json can't serialize type : class de.cebitec.gendb.persistence.TestFeature
java.lang.RuntimeException: json can't serialize type : class database.models.security.User
at com.mongodb.util.ClassMapBasedObjectSerializer.serialize(ClassMapBasedObjectSerializer.java:79)
at com.mongodb.util.JSONSerializers$MapSerializer.serialize(JSONSerializers.java:323)
at com.mongodb.util.ClassMapBasedObjectSerializer.serialize(ClassMapBasedObjectSerializer.java:82)
at com.mongodb.util.JSON.serialize(JSON.java:53)
at com.mongodb.util.JSON.serialize(JSON.java:39)
at com.mongodb.BasicDBObject.toString(BasicDBObject.java:196)
at org.springframework.data.mongodb.repository.query.PartTreeMongoQuery.createQuery(PartTreeMongoQuery.java:113)
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.doInvoke(RepositoryFactorySupport.java:482)
at org.springframework.data.projection.DefaultMethodInvokingMethodInterceptor.invoke(DefaultMethodInvokingMethodInterceptor.java:61)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at com.sun.proxy.$Proxy56.findByRevisorAndCreatedBetween(Unknown Source)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago

Write tip

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