You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/03/17 22:37:24 UTC

[GitHub] [camel-kafka-connector] luigidemasi commented on issue #1107: aws2 s3 source connector ClassCastException for value.conver

luigidemasi commented on issue #1107:
URL: https://github.com/apache/camel-kafka-connector/issues/1107#issuecomment-801487018


   @jonaswagner, @oscerd is right: in a source task, a converter is used to convert incoming data to a byte array using fromConnectData method from [Converter](https://github.com/apache/kafka/blob/9adfac280392da0837cfd8d582bc540951e94087/connect/api/src/main/java/org/apache/kafka/connect/storage/Converter.java#L46) interface but you already have byte array in your body, that's the reason for the error.
   
   So you can use `org.apache.kafka.connect.converters.ByteArrayConverter` to have a raw byte array in your topic, or not using a converter at all and get a json with schema:
   
   ```json
   {"schema":{"type":"bytes","optional":false},"payload":"/9j/4gIcSUNDX1BST0ZJTEUAAQEAAAIMbGNtcwIQAABtbnRyUkdCIFhZWiAH3AABABkAAwApADlhY3NwQVBQTAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA9tYAAQAAAADTLWxjbXMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAApkZXNjAAAA/AAAAF5jcHJ0AAABXAAAAAt3dHB0AAABaAAAABRia3B0AAABfAAAABRyWFlaAAABkAAAABRnWFlaAAABpAAAABRiWFlaAAABuAAAABRyVFJDAAABzAAAAEBnVFJDAAABzAAAAEBiVFJDAAABzAAAAEBkZXNjAAAAAAAAAANjMgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB0ZXh0AAAAAEZCAABYWVogAAAAAAAA9tYAAQAAAADTLVhZWiAAAAAAAAADFgAAAzMAAAKkWFlaIAAAAAAAAG+iAAA49QAAA5BYWVogAAAAAAAAYpkAALeFAAAY2lhZWiAAAAAAAAAkoAAAD4QAALbPY3Vyd....."}
   ```
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org