# How to save XML/JSON string as XMLType/Blob using JDBCSinkConnector

**URL:** <https://forum.confluent.io/t/how-to-save-xml-json-string-as-xmltype-blob-using-jdbcsinkconnector/9999>\
**Category:** Self-Managed Connectors\
**Created:** [1 February 2024 14:05 UTC](https://forum.confluent.io/t/how-to-save-xml-json-string-as-xmltype-blob-using-jdbcsinkconnector/9999 "2024-02-01T14:05:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hrishi](https://avatars.discourse-cdn.com/v4/letter/h/d2c977/32.png) [@Hrishi](https://forum.confluent.io/u/Hrishi)\
**Post date:** [1 February 2024 14:05 UTC](https://forum.confluent.io/t/how-to-save-xml-json-string-as-xmltype-blob-using-jdbcsinkconnector/9999/1 "2024-02-01T14:05:09Z")

</div>

Hello,  
We have a Kafka topic with AVRO schema as follows,

> {  
> “type”: “record”,  
> “name”: “CaseInfo”,  
> “namespace”: “case.avro”,  
> “fields”: [  
> {  
> “name”: “caseid”,  
> “type”: “string”  
> },  
> {  
> “name”: “caseData”,  
> “type”: [  
> “null”,  
> “string”  
> ],  
> “default”: null  
> }  
> ]  
> }

Now caseData is XML string and we want to persist it in Oracle database using JDBCSinkConnector.  
We have created a Table with XMLType column

> Database Table case\_info  
> caseId, varchar2  
> casedata, XMLType

The SinkConnector fails with following error

> ORA-01461: can bind a LONG value only for insert into a LONG column.

So we tried to convert the XML to JSON and sent JSON string in caseData and tried to persist it in a Blob column and it fails with

> java.sql.SQLException: ORA-01465: invalid hex number

though there are no hex chars in the string. We then tried to persist this JSON string in a CLOB column and it worked.  
Is there a way to persist large String from kafka topic to XMLType or Blob using JDBCSinkConnector?
