title: DataException: Converting byte[] to Kafka Connect data failed due to serialization error
body: <p>I am using Kafka connect to persist data from Kafka broker to elastic search using Confluent Platform.</p>
  
  <p>I have written a SinkConnector to persist data to elastic search.</p>
  
  <p>Connect-avro-standalone.properties configuration are:</p>
  
  <pre><code>     key.converter=org.apache.kafka.connect.json.JsonConverter
       value.converter=org.apache.kafka.connect.json.JsonConverter
  </code></pre>
  
  <p>But when I push a valid json from the avro producer on to the Kafka it results in below exception.</p>
  
  <pre><code>  2016-10-05 15:02:25,225] ERROR Task kafka-elasticsearch-sink1-0 threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask)
  org.apache.kafka.connect.errors.DataException: Converting byte[] to Kafka Connect data failed due to serialization error:
          at org.apache.kafka.connect.json.JsonConverter.toConnectData(JsonConverter.java:328)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:356)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:226)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:170)
          at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:142)
          at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:140)
          at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:175)
          at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
          at java.util.concurrent.FutureTask.run(FutureTask.java:266)
          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
          at java.lang.Thread.run(Thread.java:745)
  Caused by: org.apache.kafka.common.errors.SerializationException: java.lang.ArrayIndexOutOfBoundsException: 6
  Caused by: java.lang.ArrayIndexOutOfBoundsException: 6
          at com.fasterxml.jackson.core.io.UTF32Reader.read(UTF32Reader.java:138)
          at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.loadMore(ReaderBasedJsonParser.java:153)
          at com.fasterxml.jackson.core.json.ReaderBasedJsonParser._skipWSOrEnd(ReaderBasedJsonParser.java:1854)
          at com.fasterxml.jackson.core.json.ReaderBasedJsonParser.nextToken(ReaderBasedJsonParser.java:571)
  </code></pre>