title: Invalid value: null used for required field: \"null\", schema type: STRING\n\tat
body: <p>We're upgrading to Confluent Platform 5.5.2, after upgrading, one of our Kafka JDBC Sink Connector (not all) starts getting the issue with the error log below</p>
  <p><code>org.apache.kafka.connect.errors.ConnectException: Tolerance exceeded in error handler\n\tat org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:178)\n\tat org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execute(RetryWithToleranceOperator.java:104)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.convertAndTransformRecord(WorkerSinkTask.java:495)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.convertMessages(WorkerSinkTask.java:472)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.poll(WorkerSinkTask.java:328)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.iteration(WorkerSinkTask.java:232)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:204)\n\tat org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:185)\n\tat org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:235)\n\tat java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)\n\tat java.util.concurrent.FutureTask.run(FutureTask.java:266)\n\tat java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)\n\tat java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)\n\tat java.lang.Thread.run(Thread.java:748)\nCaused by: org.apache.kafka.connect.errors.SchemaBuilderException: Invalid default value\n\tat org.apache.kafka.connect.data.SchemaBuilder.defaultValue(SchemaBuilder.java:131)\n\tat io.confluent.connect.avro.AvroData.toConnectSchema(AvroData.java:1812)\n\tat io.confluent.connect.avro.AvroData.toConnectSchema(AvroData.java:1567)\n\tat io.confluent.connect.avro.AvroData.toConnectSchema(AvroData.java:1687)\n\tat io.confluent.connect.avro.AvroData.toConnectSchema(AvroData.java:1543)\n\tat io.confluent.connect.avro.AvroData.toConnectData(AvroData.java:1226)\n\tat io.confluent.connect.avro.AvroConverter.toConnectData(AvroConverter.java:108)\n\tat org.apache.kafka.connect.storage.Converter.toConnectData(Converter.java:87)\n\tat org.apache.kafka.connect.runtime.WorkerSinkTask.lambda$convertAndTransformRecord$1(WorkerSinkTask.java:495)\n\tat org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:128)\n\tat org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:162)\n\t... 13 more\nCaused by: org.apache.kafka.connect.errors.DataException: Invalid value: null used for required field: \&quot;null\&quot;, schema type: STRING\n\tat org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:220)\n\tat org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:213)\n\tat org.apache.kafka.connect.data.SchemaBuilder.defaultValue(SchemaBuilder.java:129)\n\t... 23 more\n</code></p>
  <p>Any one got the same issue and already resolved it?</p>
  <p>We haven't upgraded Schema Registry to newer version (it's still using 5.0.0 version), upgrading Schema Registry might help to resolve the issue?</p>
  <p>Update:</p>
  <ul>
  <li>We did upgrade Schema Registry to the same Confluent Platform version, but the error still be happening.</li>
  </ul>
  <p>Fixed:</p>
  <ul>
  <li>I have figured out the root cause was there is a field in my AVRO schema has <code>type</code> not include <code>&quot;null&quot;</code> value. After adding <code>&quot;null&quot;</code> value into <code>type</code> the issue has been resolved.</li>
  </ul>