I am writing transactions into Kinesis Stream(using AWS SDK, JAVA), but the putRecord is failing with the reason of "Marshalling error". I tried to send a simple string(instead of my complex object), but still getting the same error. Below is the stacktrace snippet.
AWS SDK version: 1.11.76
com.amazonaws.SdkClientException: Unable to marshall request to JSON: com.fasterxml.jackson.dataformat.cbor.CBORGenerator.getOutputContext()Lcom/fasterxml/jackson/core/json/JsonWriteContext;
at com.amazonaws.services.kinesis.model.transform.PutRecordRequestMarshaller.marshall(PutRecordRequestMarshaller.java:85)
at com.amazonaws.services.kinesis.AmazonKinesisClient.putRecord(AmazonKinesisClient.java:1365)
Resolved by removing Jackson Dependency from my package. Reason: Conflict between my dependency import on Jackson vs AWS SDK's dependency on Jackson. Kinesis Client uses Jackson for marshalling. I was using Jackson's latest version, which was causing dependency conflict.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With