DTStack / DTStack/chunjun

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

Open
#1,566 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
Java
Stars
4.1k
Forks
1.7k
PR merge metrics
No merged PRs in 30d

Description

### Search before asking

- [X] I had searched in the [issues](https://github.com/DTStack/chunjun/issues) and found no similar issues.

### 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?

- [X] Yes I am willing to submit a PR!

### Code of Conduct

- [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.