java - Dynamodb mapper unable to read when using @DBDocument annotation -


i have entity class has strings/ints member variable , member variable type photo. have defined photo type as:

@dynamodbdocument public static class photo {     @dynamodbattribute(attributename = "url")     public string geturl() {         return url;     }      @dynamodbattribute(attributename = "width")     public integer getwidth() {         return width;     }      @dynamodbattribute(attributename = "height")     public integer getheight() {         return height;     }      public void seturl(string url) {         this.url = url;     }      public void setwidth(integer width) {         this.width = width;     }      public void setheight(integer height) {         this.height = height;     }      private string url;     private integer width;     private integer height;      public photo(string url, integer width, integer height) {         this.url = url;         this.width = width;         this.height = height;     } } 

when try write entity object, can see photo type stored map (m).

but when try read dynamo same entity, gives exception:

com.amazonaws.services.dynamodbv2.datamodeling.dynamodbmappingexception: postingphotoentity[detail]; not unconvert attribute 

if have define convert/unconvert photo, use of @dbdocument annotation. had thought can deserialize data table.

please help!

i had define default ctor photo

public photo() { } 

Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -