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.

Spring JIRA | Sergey Alaev | 5 years ago
  1. 0

    Exception when trying to save an object with field of type java.math.BigDecimal This data type is quite popular and should be supported natively. 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.<init>(PreferredConstructorDiscoverer.java:81) at org.springframework.data.mapping.BasicPersistentEntity.<init>(BasicPersistentEntity.java:49) at org.springframework.data.document.mongodb.mapping.BasicMongoPersistentEntity.<init>(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$1.doWith(AbstractMappingContext.java:201) at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:513) 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.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:58) at org.springframework.data.document.mongodb.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:316) at org.springframework.data.document.mongodb.convert.MappingMongoConverter.write(MappingMongoConverter.java:287)

    Spring JIRA | 5 years ago | Sergey Alaev
    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.
  2. 0

    Exception when trying to save an object with field of type java.math.BigDecimal This data type is quite popular and should be supported natively. 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.<init>(PreferredConstructorDiscoverer.java:81) at org.springframework.data.mapping.BasicPersistentEntity.<init>(BasicPersistentEntity.java:49) at org.springframework.data.document.mongodb.mapping.BasicMongoPersistentEntity.<init>(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$1.doWith(AbstractMappingContext.java:201) at org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:513) 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.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:58) at org.springframework.data.document.mongodb.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:316) at org.springframework.data.document.mongodb.convert.MappingMongoConverter.write(MappingMongoConverter.java:287)

    Spring JIRA | 5 years ago | Sergey Alaev
    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.
  3. 0

    You must explicitly add it to the 'injects' option in one of your modulesoid.apps.ridematch.payments.SetPaymentActivity

    Stack Overflow | 12 months ago | Elad Benda
    java.lang.IllegalArgumentException: No inject registered for members/com.google.android.apps.ridematch.payments.SetPaymentActivity. You must explicitly add it to the 'injects' option in one of your modules.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 74#90038182

    GitHub | 2 years ago | Rafiot
    java.lang.IllegalArgumentException: No inject registered for members/org.smssecure.smssecure.jobs.CreateSignedPreKeyJob. You must explicitly add it to the 'injects' option in one of your modules.
  6. 0

    Use Dagger modules without the "injects" directive

    Stack Overflow | 3 years ago | spCoder
    java.lang.RuntimeException: Unable to start activity ComponentInfo{com.ef.daggertestproject/com.ef.daggertestproject.MainActivity}: java.lang.IllegalArgumentException: No inject registered for members/com.ef.daggertestproject.MainActivity. You must explicitly add it to the 'injects' option in one of your modules.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. 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.<init>()
    2. Spring Data Core
      BasicPersistentEntity.<init>
      1. org.springframework.data.mapping.PreferredConstructorDiscoverer.<init>(PreferredConstructorDiscoverer.java:81)
      2. org.springframework.data.mapping.BasicPersistentEntity.<init>(BasicPersistentEntity.java:49)
      2 frames
    3. org.springframework.data
      MongoMappingContext.createPersistentEntity
      1. org.springframework.data.document.mongodb.mapping.BasicMongoPersistentEntity.<init>(BasicMongoPersistentEntity.java:47)
      2. org.springframework.data.document.mongodb.mapping.MongoMappingContext.createPersistentEntity(MongoMappingContext.java:59)
      3. org.springframework.data.document.mongodb.mapping.MongoMappingContext.createPersistentEntity(MongoMappingContext.java:33)
      3 frames
    4. Spring Data Core
      AbstractMappingContext$1.doWith
      1. org.springframework.data.mapping.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:164)
      2. org.springframework.data.mapping.AbstractMappingContext$1.doWith(AbstractMappingContext.java:201)
      2 frames
    5. Spring Core
      ReflectionUtils.doWithFields
      1. org.springframework.util.ReflectionUtils.doWithFields(ReflectionUtils.java:513)
      1 frame
    6. Spring Data Core
      AbstractMappingContext.getPersistentEntity
      1. org.springframework.data.mapping.AbstractMappingContext.addPersistentEntity(AbstractMappingContext.java:176)
      2. org.springframework.data.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:133)
      3. org.springframework.data.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:114)
      4. org.springframework.data.mapping.AbstractMappingContext.getPersistentEntity(AbstractMappingContext.java:58)
      4 frames
    7. org.springframework.data
      MappingMongoConverter.write
      1. org.springframework.data.document.mongodb.convert.MappingMongoConverter.writeInternal(MappingMongoConverter.java:316)
      2. org.springframework.data.document.mongodb.convert.MappingMongoConverter.write(MappingMongoConverter.java:287)
      2 frames