averemee-si / oracdc

Oracle database CDC (Change Data Capture)
http://a2-solutions.eu/
Apache License 2.0
107 stars 37 forks source link

Invalid column name when using OraCdcSourceConnector #36

Closed dellekappa closed 1 year ago

dellekappa commented 1 year ago

When I try to install an OraCdcCourceConnector in order to load cdc from mview logs this error occurs:

2022-11-14 11:10:43,393] ERROR [oracdc-mview-wallet-connector|task-0] Unable to get table information. (solutions.a2.cdc.oracle.OraTable:136)
2022-11-14T11:10:43.393979325Z [2022-11-14 11:10:43,393] ERROR [oracdc-mview-wallet-connector|task-0] Invalid column name
java.sql.SQLException: Invalid column name
    at oracle.jdbc.driver.OracleStatement.getColumnIndexPrimitive(OracleStatement.java:4694)
    at oracle.jdbc.driver.OracleStatement.getColumnIndex(OracleStatement.java:4652)
    at oracle.jdbc.driver.InsensitiveScrollableResultSet.findColumn(InsensitiveScrollableResultSet.java:362)
    at oracle.jdbc.driver.GeneratedResultSet.getString(GeneratedResultSet.java:661)
    at oracle.ucp.jdbc.proxy.oracle$1ucp$1jdbc$1proxy$1oracle$1ResultSetProxy$2oracle$1jdbc$1internal$1OracleResultSet$$$Proxy.getString(Unknown Source)
    at solutions.a2.cdc.oracle.OraColumn.<init>(OraColumn.java:118)
    at solutions.a2.cdc.oracle.OraTable4SourceConnector.buildColumnList(OraTable4SourceConnector.java:133)
    at solutions.a2.cdc.oracle.OraTable.<init>(OraTable.java:117)
    at solutions.a2.cdc.oracle.OraCdcSourceTask.start(OraCdcSourceTask.java:98)
    at org.apache.kafka.connect.runtime.WorkerSourceTask.initializeAndStart(WorkerSourceTask.java:226)
    at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:186)
    at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:243)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
    at java.base/java.lang.Thread.run(Thread.java:833)
  (solutions.a2.cdc.oracle.OraTable:137)

it seems related to the fact that the column DATA_DEFAULT is missing in OraDictSqlTexts.COLUMN_LIST_MVIEW query

averemee-si commented 1 year ago

Salve Giulio,

Grazie mille per la correzione e il consiglio!

Done. Please see - https://github.com/averemee-si/oracdc/commit/c0ea54bee8c029c446a4a7d265cdaf78ed3aeab3

Cordiali saluti, Alessio

averemee-si commented 1 year ago

No reponse from filer in two weeks