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.

  • I have an entity that has a field called {{signedDate}} but I have annotated it with {{@Field("signed")}}. I also have a method {{isSigned()}} in the same entity, which basically returns whether {{signedDate}} is {{null}} or not. When I perform any update operations using {{MongoOperations}} involving the {{signed}}/{{signedDate}} field, it gives the following error, even if I mark {{isSigned()}} as transient: {noformat} Exception in thread "main" org.springframework.data.mapping.model.MappingException: No property signed found on [class]! at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:237) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:215) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:203) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.getPath(QueryMapper.java:746) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:637) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:614) at org.springframework.data.mongodb.core.convert.UpdateMapper$MetadataBackedUpdateField.<init>(UpdateMapper.java:178) at org.springframework.data.mongodb.core.convert.UpdateMapper.createPropertyField(UpdateMapper.java:149) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:113) at org.springframework.data.mongodb.core.convert.QueryMapper.convertSimpleOrDBObject(QueryMapper.java:294) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedKeyword(QueryMapper.java:178) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:91) at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:1006) at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:997) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:410) at org.springframework.data.mongodb.core.MongoTemplate.doUpdate(MongoTemplate.java:997) at org.springframework.data.mongodb.core.MongoTemplate.updateFirst(MongoTemplate.java:971) {noformat} I am attaching a maven project that produces the problem.
    via by Andy Chang,
  • I have an entity that has a field called {{signedDate}} but I have annotated it with {{@Field("signed")}}. I also have a method {{isSigned()}} in the same entity, which basically returns whether {{signedDate}} is {{null}} or not. When I perform any update operations using {{MongoOperations}} involving the {{signed}}/{{signedDate}} field, it gives the following error, even if I mark {{isSigned()}} as transient: {noformat} Exception in thread "main" org.springframework.data.mapping.model.MappingException: No property signed found on [class]! at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:237) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:215) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:203) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.getPath(QueryMapper.java:746) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:637) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:614) at org.springframework.data.mongodb.core.convert.UpdateMapper$MetadataBackedUpdateField.<init>(UpdateMapper.java:178) at org.springframework.data.mongodb.core.convert.UpdateMapper.createPropertyField(UpdateMapper.java:149) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:113) at org.springframework.data.mongodb.core.convert.QueryMapper.convertSimpleOrDBObject(QueryMapper.java:294) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedKeyword(QueryMapper.java:178) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:91) at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:1006) at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:997) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:410) at org.springframework.data.mongodb.core.MongoTemplate.doUpdate(MongoTemplate.java:997) at org.springframework.data.mongodb.core.MongoTemplate.updateFirst(MongoTemplate.java:971) {noformat} I am attaching a maven project that produces the problem.
    via by Andy Chang,
  • MongoDB + Spring MVC
    via Stack Overflow by JavaDevil
    ,
    • org.springframework.data.mapping.model.MappingException: No property signed found on [class]! at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:237) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:215) at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:203) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.getPath(QueryMapper.java:746) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:637) at org.springframework.data.mongodb.core.convert.QueryMapper$MetadataBackedField.<init>(QueryMapper.java:614) at org.springframework.data.mongodb.core.convert.UpdateMapper$MetadataBackedUpdateField.<init>(UpdateMapper.java:178) at org.springframework.data.mongodb.core.convert.UpdateMapper.createPropertyField(UpdateMapper.java:149) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:113) at org.springframework.data.mongodb.core.convert.QueryMapper.convertSimpleOrDBObject(QueryMapper.java:294) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedKeyword(QueryMapper.java:178) at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:91) at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:1006) at org.springframework.data.mongodb.core.MongoTemplate$11.doInCollection(MongoTemplate.java:997) at org.springframework.data.mongodb.core.MongoTemplate.execute(MongoTemplate.java:410) at org.springframework.data.mongodb.core.MongoTemplate.doUpdate(MongoTemplate.java:997) at org.springframework.data.mongodb.core.MongoTemplate.updateFirst(MongoTemplate.java:971)

    Users with the same issue

    Unknown visitor1 times, last one,