org.springframework.data.mapping.model.MappingException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • {{PreferredConstructorDiscoverer}} constructs {{LocalVariableTableParameterNameDiscoverer}} itself, which might cause {{MappingException}}: {noformat}org.springframework.data.mapping.model.MappingException: No property null found on entity class java.time.LocalDateTime to bind constructor parameter to! at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:257) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1131) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:78) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1080) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:811) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:270) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:263) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:261) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:263) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:201) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:197) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:78) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:2016) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1655) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1473) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:494) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:489) ... {noformat} Is it possible to make {{ParameterNameDiscoverer}} a bean and use it everywhere in spring with possibility for simple replacement by developer? Or am I missing something?
    via by Adam Pierzchała,
  • {{PreferredConstructorDiscoverer}} constructs {{LocalVariableTableParameterNameDiscoverer}} itself, which might cause {{MappingException}}: {noformat}org.springframework.data.mapping.model.MappingException: No property null found on entity class java.time.LocalDateTime to bind constructor parameter to! at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:257) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1131) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:78) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1080) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:811) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:270) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:263) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:261) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:263) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:201) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:197) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:78) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:2016) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1655) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1473) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:494) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:489) ... {noformat} Is it possible to make {{ParameterNameDiscoverer}} a bean and use it everywhere in spring with possibility for simple replacement by developer? Or am I missing something?
    via by Adam Pierzchała,
  • Java Spring Data MongoDB and Java 8 Time
    via Stack Overflow by Fat_FS
    ,
  • If the integration tests running without clover instrumentation the test works fine, but with clover instrumentation the one test will fail. {code} org.springframework.data.mapping.model.MappingException: No property null found on entity class com.test.framework.Model.DataModel to bind constructor parameter to! at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:232) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:212) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:176) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:172) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:75) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1841) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1492) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1303) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:475) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:470) at com.test.framework.DatabaseSpec.search User Query(DatabaseSpec.groovy:52) {code} its seem to be a problem with follow declaration {code} @PersistenceConstructor public DataModel(String username, String password) {code}
    via by Sam Zander,
  • If the integration tests running without clover instrumentation the test works fine, but with clover instrumentation the one test will fail. {code} org.springframework.data.mapping.model.MappingException: No property null found on entity class com.test.framework.Model.DataModel to bind constructor parameter to! at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:232) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:212) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:176) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:172) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:75) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1841) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1492) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1303) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:475) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:470) at com.test.framework.DatabaseSpec.search User Query(DatabaseSpec.groovy:52) {code} its seem to be a problem with follow declaration {code} @PersistenceConstructor public DataModel(String username, String password) {code}
    via by Sam Zander,
    • org.springframework.data.mapping.model.MappingException: No property null found on entity class java.time.LocalDateTime to bind constructor parameter to! at org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74) at org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63) at org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:257) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1131) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:78) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1080) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:811) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:270) at org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:263) at org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:261) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:263) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:201) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:197) at org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:78) at org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:2016) at org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1655) at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1473) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:494) at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:489)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    1 more bugmates