Error Save Batch Record throws DynamoDBTyped or DynamoDBTypeConverted

+1 vote

What I want to do? -I wanted to save batch of records into DynamoDB using DynamoDBMapper.

Model Class

    @DynamoDBAttribute(attributeName = "target")
    public String[] getTarget() {
        return target;
    }
    @DynamoDBAttribute(attributeName = "contentType")
    public String getContentType() {
        return contentType;
    }
    @DynamoDBAttribute(attributeName = "dueDate")
    public String getDueDate() {
        return dueDate;
    }
    @DynamoDBAttribute(attributeName = "metadata")
    public Metadata getMetadata() {
        return metadata;
    }
    /** setters start here **/
    public void setJobId(String string) {
        this.jobId = string;
    }
    public void setJobName(String jobName) {
        this.jobName = jobName;
    }
    public void setStrings(Stringparams[] strings) {
        this.stringparams = strings;
    }
    public void setURL(String url) {
        this.url = url;
    }
    public void setSource(String source) {
        this.source = source;
    }
    public void setTarget(String[] target) {
        this.target = target;
    }
    public void setContentType(String contentType) {
        this.contentType = contentType;
    }
    public void setDueDate(String dueDate) {
        this.dueDate = dueDate;
    }
    public void setMetadata(Metadata metadata) {
        this.metadata = metadata;
    }
    @DynamoDBDocument
    public static final class Stringparams {
        @DynamoDBAutoGeneratedKey
        public String key;
        public String value;
        public String description;
        public String getKey() {
            return key;
        }
        public void setKey(String key) {
            this.key = key;
        }
        @DynamoDBAttribute(attributeName = "value")
        public String getValue() {
            return value;
        }
        public void setValue(String value) {
            this.value = value;
        }
        @DynamoDBAttribute(attributeName = "description")
        public String getDescription() {
            return description;
        }
        public void setDescription(String description) {
            this.description = description;
        }
    }
    

Question: I see an error not supported; requires @DynamoDBTyped or @DynamoDBTypeConverted. Can anyone please help me in understanding and share the fix?

Sep 26, 2018 in AWS by bug_seeker
• 15,520 points
4,289 views

1 answer to this question.

0 votes

There is simpler way by use annotation @DynamoDBDocument

For example in the above java class,

@DynamoDBDocument
public class Metadata {
    private Stirng aa;
    private int bb;
}

Then it should work

answered Sep 26, 2018 by Priyaj
• 58,100 points

Related Questions In AWS

0 votes
1 answer

Network error: Connection timed out or Error connecting to [instance] in AWS.

Hi@akhtar, Check your security group rules. You need ...READ MORE

answered Apr 28, 2020 in AWS by MD
• 95,460 points
3,581 views
0 votes
1 answer

How to fetch a list of items (like a SQL IN clause)

You can use this as this worked ...READ MORE

answered Oct 26, 2018 in AWS by Priyaj
• 58,100 points
10,223 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Which cloud hosting is best ( AWS or Azure or Google)

Hello @Hammer, This totally depends on your needs, ...READ MORE

answered Aug 10, 2018 in AWS by Priyaj
• 58,100 points
935 views
+1 vote
2 answers

AWS WAF - Auto Save Web Application Firewall logs in S3.

You can do this through the console ...READ MORE

answered Jul 13, 2018 in AWS by Priyaj
• 58,100 points
1,729 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP