You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When update a column in table, in-case table has other not null column not be updated => exception occurs.
For example: I update column AGE only.
create table A_TEST
(
ID NUMBER generated as identity
constraint A_TEST_PK
primary key,
A_NAME VARCHAR2(50) not null,
AGE NUMBER
)
Log miner enable min and primary key level Bellow is error:
Error during poll on topic TEST_DB.TEST_SCHEMA.A_TEST SQL :update "TEST_SCHEMA"."A_TEST" set "AGE" = 17 where "ID" = 1 and "AGE" = 10 (com.ecer.kafka.connect.oracle.OracleSourceTask:297)
org.apache.kafka.connect.errors.DataException: Invalid value: Invalid value: null used for required field: "A_NAME", schema type: STRING
at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:220)
at org.apache.kafka.connect.data.Struct.validate(Struct.java:233)
at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:250)
at org.apache.kafka.connect.data.Struct.put(Struct.java:216)
at org.apache.kafka.connect.data.Struct.put(Struct.java:203)
at com.ecer.kafka.connect.oracle.OracleSourceTask.setValueV2(OracleSourceTask.java:330)
at com.ecer.kafka.connect.oracle.OracleSourceTask.poll(OracleSourceTask.java:279)
at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:291)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:248)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:241)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
The text was updated successfully, but these errors were encountered:
it seems that the error message you are seeing is related to the com.ecer.kafka.connect.oracle.OracleSourceTask class.
One possible reason for this error could be that the A_NAME column in your table is defined as not null and is not being updated along with the AGE column . This could be causing the DataException to be thrown with the message “Invalid value: null used for required field: ‘A_NAME’
To resolve this issue, you may want to ensure that all columns defined as not null in your table are being updated along with the AGE column. Alternatively, you can modify the definition of the A_NAME column to allow null values by removing the not null constraint
When update a column in table, in-case table has other not null column not be updated => exception occurs.
For example: I update column AGE only.
create table A_TEST
(
ID NUMBER generated as identity
constraint A_TEST_PK
primary key,
A_NAME VARCHAR2(50) not null,
AGE NUMBER
)
Log miner enable min and primary key level
Bellow is error:
Error during poll on topic TEST_DB.TEST_SCHEMA.A_TEST SQL :update "TEST_SCHEMA"."A_TEST" set "AGE" = 17 where "ID" = 1 and "AGE" = 10 (com.ecer.kafka.connect.oracle.OracleSourceTask:297)
org.apache.kafka.connect.errors.DataException: Invalid value: Invalid value: null used for required field: "A_NAME", schema type: STRING
at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:220)
at org.apache.kafka.connect.data.Struct.validate(Struct.java:233)
at org.apache.kafka.connect.data.ConnectSchema.validateValue(ConnectSchema.java:250)
at org.apache.kafka.connect.data.Struct.put(Struct.java:216)
at org.apache.kafka.connect.data.Struct.put(Struct.java:203)
at com.ecer.kafka.connect.oracle.OracleSourceTask.setValueV2(OracleSourceTask.java:330)
at com.ecer.kafka.connect.oracle.OracleSourceTask.poll(OracleSourceTask.java:279)
at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:291)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:248)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:241)
at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
The text was updated successfully, but these errors were encountered: