org.springframework.data.mapping.model.MappingException: No property null found on entity class com.test.framework.Model.DataModel to bind constructor parameter to!

Atlassian JIRA | Sam Zander | 3 years ago
  1. 0

    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}

    Atlassian JIRA | 3 years ago | Sam Zander
    org.springframework.data.mapping.model.MappingException: No property null found on entity class com.test.framework.Model.DataModel to bind constructor parameter to!
  2. 0

    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}

    Atlassian JIRA | 3 years ago | Sam Zander
    org.springframework.data.mapping.model.MappingException: No property null found on entity class com.test.framework.Model.DataModel to bind constructor parameter to!
  3. 0

    Why do I get a "No property node found on entity class … to bind constructor parameter to!" with Spring Data MongoDB

    Stack Overflow | 2 years ago | Marco Calì
    org.springframework.data.mapping.model.MappingException: No property node found on entity class com.th.model.Price to bind constructor parameter to!
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java Spring Data MongoDB and Java 8 Time

    Stack Overflow | 2 years ago | Fat_FS
    org.springframework.security.authentication.InternalAuthenticationServiceException: No property null found on entity class java.time.LocalDate to bind constructor parameter to!
  6. 0

    {{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?

    Spring JIRA | 3 years ago | Adam Pierzchała
    org.springframework.data.mapping.model.MappingException: No property null found on entity class java.time.LocalDateTime to bind constructor parameter to!

    2 unregistered visitors
    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. 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()
    2. Spring Data Core
      ReflectionEntityInstantiator.createInstance
      1. org.springframework.data.mapping.model.PersistentEntityParameterValueProvider.getParameterValue(PersistentEntityParameterValueProvider.java:74)
      2. org.springframework.data.mapping.model.SpELExpressionParameterValueProvider.getParameterValue(SpELExpressionParameterValueProvider.java:63)
      3. org.springframework.data.convert.ReflectionEntityInstantiator.createInstance(ReflectionEntityInstantiator.java:71)
      3 frames
    3. Spring Data MongoDB - Core
      MongoTemplate.findOne
      1. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:232)
      2. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:212)
      3. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:176)
      4. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:172)
      5. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:75)
      6. org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:1841)
      7. org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1492)
      8. org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1303)
      9. org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:475)
      10. org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:470)
      10 frames