Announcement Announcement Module
Collapse
No announcement yet.
Mapping exception with no setters Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Mapping exception with no setters

    I am attempting to save Google Protocol Buffer data to mongo db. I did this by creating custom converter that convert gpb to json and storing it and vice versa on reading.
    but when I attempt to query based on property it started giving me this error.

    Code:
    org.springframework.data.mapping.model.MappingException: No property xyz found on abc
        at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:228)
        at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:206)
        at org.springframework.data.mapping.context.AbstractMappingContext.getPersistentPropertyPath(AbstractMappingContext.java:194)
        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.QueryMapper.createPropertyField(QueryMapper.java:152)
        at org.springframework.data.mongodb.core.convert.QueryMapper.getMappedObject(QueryMapper.java:113)
        at org.springframework.data.mongodb.core.MongoTemplate.doFindOne(MongoTemplate.java:1465)
        at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:494)
        at org.springframework.data.mongodb.core.MongoTemplate.findOne(MongoTemplate.java:489)
    This this related to GPB object don't have setters? How do I fix this issue? Obviously generated java code cannot be touch in anyway, putting annotation is out of the question here.

    Thanks

    Frank

  • #2
    Please, move your question to the StackOverflow - we are going to close this forum soon and rely on SO.
    We need to clean this forum (old unanswered question) before close it.

    Thanks for understanding

    Comment

    Working...
    X