memiiso / debezium-server-iceberg

Replicates any database (CDC events) to Apache Iceberg (To Cloud Storage)
Apache License 2.0
200 stars 36 forks source link

Cannot invoke "java.lang.CharSequence.toString()" because "value" is null #402

Closed duc-dn closed 2 months ago

duc-dn commented 3 months ago

Hi @ismailsimsek, I ran CDC on the table in Oracle and faced this error. I think it is related connector so please check it help me.

ERROR [io.deb.ser.ConnectorLifecycle] (pool-7-thread-1) Connector completed: success = 'false', message = 'java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "value" is null', error = 'java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "value" is null': java.lang.NullPointerException: Cannot invoke "java.lang.CharSequence.toString()" because "value" is null
cdc-test  |     at org.apache.iceberg.parquet.ParquetValueWriters$StringWriter.write(ParquetValueWriters.java:328)
cdc-test  |     at org.apache.iceberg.parquet.ParquetValueWriters$StringWriter.write(ParquetValueWriters.java:316)
cdc-test  |     at org.apache.iceberg.parquet.ParquetValueWriters$StructWriter.write(ParquetValueWriters.java:581)
cdc-test  |     at org.apache.iceberg.parquet.ParquetWriter.add(ParquetWriter.java:135)
cdc-test  |     at org.apache.iceberg.deletes.EqualityDeleteWriter.write(EqualityDeleteWriter.java:67)
cdc-test  |     at org.apache.iceberg.io.BaseTaskWriter$RollingEqDeleteWriter.write(BaseTaskWriter.java:418)
cdc-test  |     at org.apache.iceberg.io.BaseTaskWriter$RollingEqDeleteWriter.write(BaseTaskWriter.java:401)
cdc-test  |     at org.apache.iceberg.io.BaseTaskWriter$BaseRollingWriter.write(BaseTaskWriter.java:307)
cdc-test  |     at org.apache.iceberg.io.BaseTaskWriter$BaseEqualityDeltaWriter.delete(BaseTaskWriter.java:202)
cdc-test  |     at io.debezium.server.iceberg.tableoperator.BaseDeltaTaskWriter$RowDataDeltaWriter.delete(BaseDeltaTaskWriter.java:75)
cdc-test  |     at io.debezium.server.iceberg.tableoperator.BaseDeltaTaskWriter.write(BaseDeltaTaskWriter.java:63)
cdc-test  |     at io.debezium.server.iceberg.tableoperator.BaseDeltaTaskWriter.write(BaseDeltaTaskWriter.java:19)
cdc-test  |     at io.debezium.server.iceberg.tableoperator.IcebergTableOperator.addToTablePerSchema(IcebergTableOperator.java:180)
cdc-test  |     at io.debezium.server.iceberg.tableoperator.IcebergTableOperator.addToTable(IcebergTableOperator.java:162)
cdc-test  |     at io.debezium.server.iceberg.IcebergChangeConsumer.handleBatch(IcebergChangeConsumer.java:157)
cdc-test  |     at io.debezium.embedded.async.ParallelSmtAndConvertBatchProcessor.processRecords(ParallelSmtAndConvertBatchProcessor.java:56)
cdc-test  |     at io.debezium.embedded.async.AsyncEmbeddedEngine$PollRecords.doCall(AsyncEmbeddedEngine.java:1165)
cdc-test  |     at io.debezium.embedded.async.AsyncEmbeddedEngine$PollRecords.doCall(AsyncEmbeddedEngine.java:1146)
cdc-test  |     at io.debezium.embedded.async.RetryingCallable.call(RetryingCallable.java:47)
cdc-test  |     at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
cdc-test  |     at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
cdc-test  |     at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
cdc-test  |     at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
cdc-test  |     at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
cdc-test  |     at java.base/java.lang.Thread.run(Unknown Source)
cdc-test  | 
cdc-test  | 2024-08-22 09:24:46,156 INFO  [io.deb.ser.DebeziumServer] (main) Received request to stop the engine
cdc-test  | 2024-08-22 09:24:46,156 ERROR [io.deb.ser.DebeziumServer] (main) Exception while shuttting down Debezium [Error Occurred After Shutdown]: java.lang.IllegalStateException: Engine has been already shut down.

Full log: log.txt