java.lang.IllegalArgumentException: Multiple constructors with arguments found in class java.math.BigDecimal! Annotate one with @PreferedConstructor explicitly to select it to be used in persistence operations.

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 Spring JIRA by Sergey Alaev, 1 year ago
Multiple constructors with arguments found in class java.math.BigDecimal! Annotate one with @PreferedConstructor explicitly to select it to be used in persistence operations.
via Spring JIRA by Sergey Alaev, 1 year ago
Multiple constructors with arguments found in class java.math.BigDecimal! Annotate one with @PreferedConstructor explicitly to select it to be used in persistence operations.
java.lang.IllegalArgumentException: Multiple constructors with arguments found in class java.math.BigDecimal! Annotate one with @PreferedConstructor explicitly to select it to be used in persistence operations.
at org.springframework.data.mapping.PreferredConstructorDiscoverer.(PreferredConstructorDiscoverer.java:81)
at org.springframework.data.document.mongodb.mapping.BasicMongoPersistentEntity.(BasicMongoPersistentEntity.java:47)
at org.springframework.data.document.mongodb.mapping.MongoMappingContext.createPersistentEntity(MongoMappingContext.java:59)
at org.springframework.data.document.mongodb.mapping.MongoMappingContext.createPersistentEntity(MongoMappingContext.java:33)
at org.springframework.data.mapping.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:164)
at org.springframework.data.mapping.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:176)
at org.springframework.data.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:133)
at org.springframework.data.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:114)
at org.springframework.data.document.mongodb.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:316)
at org.springframework.data.document.mongodb.convert.MappingMongoConverter.write(MappingMongoConverter.java:287)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

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