org.springframework.data.mapping.model.MappingException: No property null found on entity class java.time.LocalDateTime to bind constructor parameter to!

Spring JIRA | Adam Pierzchała | 3 years ago
  1. 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. 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!
  3. 0

    Mongo spring-data issue with java.util.Currency: No property null found on entity class java.util.Currency to bind constructor parameter to

    Stack Overflow | 2 years ago | Isabel
    org.springframework.data.mapping.model.MappingException: No property null found on entity class java.util.Currency 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

    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!

    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 java.time.LocalDateTime 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
      MappingMongoConverter$1.doWithPersistentProperty
      1. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:257)
      2. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237)
      3. org.springframework.data.mongodb.core.convert.MappingMongoConverter.readValue(MappingMongoConverter.java:1131)
      4. org.springframework.data.mongodb.core.convert.MappingMongoConverter.access$100(MappingMongoConverter.java:78)
      5. org.springframework.data.mongodb.core.convert.MappingMongoConverter$MongoDbPropertyValueProvider.getPropertyValue(MappingMongoConverter.java:1080)
      6. org.springframework.data.mongodb.core.convert.MappingMongoConverter.getValueInternal(MappingMongoConverter.java:811)
      7. org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:270)
      8. org.springframework.data.mongodb.core.convert.MappingMongoConverter$1.doWithPersistentProperty(MappingMongoConverter.java:263)
      8 frames
    4. Spring Data Core
      BasicPersistentEntity.doWithProperties
      1. org.springframework.data.mapping.model.BasicPersistentEntity.doWithProperties(BasicPersistentEntity.java:261)
      1 frame
    5. Spring Data MongoDB - Core
      MongoTemplate.findOne
      1. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:263)
      2. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:237)
      3. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:201)
      4. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:197)
      5. org.springframework.data.mongodb.core.convert.MappingMongoConverter.read(MappingMongoConverter.java:78)
      6. org.springframework.data.mongodb.core.MongoTemplate$ReadDbObjectCallback.doWith(MongoTemplate.java:2016)
      7. org.springframework.data.mongodb.core.MongoTemplate.executeFindOneInternal(MongoTemplate.java:1655)
      8. org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1473)
      9. org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:494)
      10. org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:489)
      10 frames