DTStack / chunjun

A data integration framework
https://dtstack.github.io/chunjun/
Apache License 2.0
4k stars 1.69k forks source link

oracleLogminer增量数据时程序出错:Caused by: shade.core.com.google.common.util.concurrent.UncheckedExecutionException: java.lang.ArrayIndexOutOfBoundsException: -1 #1566

Open Ausord opened 1 year ago

Ausord commented 1 year ago

Search before asking

What happened

json文件: { "job": { "content": [ { "nameMapping": { "schemaMappings": { "FLINK_TEST": "FLINK_TEST" }, "tableMappings": { "FLINK_TEST": { "TABLE_NAME": "SINKTABLE" } }, "fieldMappings": { "FLINK_TEST": { "TABLE_NAME": { "id": "id", "USER_ID": "USER_ID", "name": "name", "date1": "date1" } } } }, "reader": { "parameter": { "jdbcUrl": "jdbc:oracle:thin:@127.0.0.1:1521:XE", "username": "sys as sysdba", "password": "niuniudev", "supportAutoAddLog": false, "table": ["FLINK_TEST.TABLE_NAME"], "cat": "UPDATE,INSERT,DELETE", "pavingData" : true, "readPosition" : "CURRENT", "queryTimeout": 30000 }, "table": { "tableName": "TABLE_NAME" }, "name": "oraclelogminerreader" }, "writer": { "parameter": { "writeMode": "insert", "username": "sys as sysdba", "password": "niuniudev", "allReplace": true, "connection": [ { "schema": "FLINK_TEST", "jdbcUrl": "jdbc:oracle:thin:@127.0.0.1:1521:XE", "table": ["SINKTABLE"] } ] }, "name": "oraclewriter" } } ], "setting": { "speed": { "bytes": 0, "channel": 1 }, "errorLimit": { "record": 1 }, "restore": { "maxRowNumForCheckpoint": 0, "isRestore": false, "restoreColumnName": "", "restoreColumnIndex": 0 }, "log": { "isLogger": true, "level": "debug", "path": "", "pattern": "" } } } }

说明:在DynamicPreparedStmt中,180行 int index = nameList.indexOf(columnName); nameList中没有columnName相关数据(columnName的值为0="type",1="before_id,2=before_user_id"}...而nameList的值就是Josn文件中的列名,所以出现int index = nameList.indexOf(columnName) ==-1)

What you expected to happen

在DynamicPreparedStmt中,180行 int index = nameList.indexOf(columnName); nameList中没有columnName相关数据(columnName的值为0="type",1="before_id,2=before_user_id"}...而nameList的值就是Josn文件中的列名,所以出现int index = nameList.indexOf(columnName) ==-1)

How to reproduce

local模式下执行此json文件,更改oracle中表的数据,job在运行时检测到数据发生此问题

Anything else

No response

Version

1.12_release

Are you willing to submit PR?

Code of Conduct

ll076110 commented 1 year ago

你的脚本有问题,schemaMappings映射错了 image