java.lang.IllegalArgumentException: Target bean is not of type of the persistent entity!

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

,
Expert tip

If you are trying to get a specific page of results, try first defining that page.

Solutions on the web

via Spring JIRA by Amy Aldredge, 1 year ago
Target bean is not of type of the persistent entity!
via Stack Overflow by Ickbinet
, 1 year ago
Target bean is not of type of the persistent entity!
via GitHub by leetal
, 1 year ago
Only ONE Relations container is allowed in a Mapping Coding Scheme.
via GitHub by nobeans
, 2 years ago
Only the target location may be specified
via Stack Overflow by pfellwock
, 11 months ago
Target bean of type java.util.LinkedHashMap is not of type of the persistent entity (com.pfellwock.cassandra.type.App)!
java.lang.IllegalArgumentException: Target bean is not of type of the persistent entity!
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:253)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:231)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1186)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$200(MappingMongoConverter.java:78)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1134)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:870)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:283)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:271)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:231)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:191)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:187)
at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:78)

Users with the same issue

Once, 6 months ago
Once, 1 week ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Once, 9 months ago
2 times, 1 month ago

Write tip

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