Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

定义Oracle数据源过程使用ServiceName连接方式导致找不到表 #147

Closed
baisui1981 opened this issue Oct 26, 2022 · 1 comment
Labels
3.6.0-alpha bug Something isn't working

Comments

@baisui1981
Copy link
Member

定义Oracle数据源之后(使用ServiceName连接方式),导致后续流程中会出现 找不到对应的表

Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.qlangtech.tis.plugin.datax.SelectedTab.getColsCandidate()
	at com.qlangtech.tis.trigger.util.JsonUtil$UnCacheString.getValue(JsonUtil.java:116)
	at com.qlangtech.tis.trigger.util.JsonUtil$1.write(JsonUtil.java:94)
	... 121 more
Caused by: java.lang.RuntimeException: com.qlangtech.tis.plugin.datax.SelectedTab.getColsCandidate()
	at com.qlangtech.tis.extension.util.GroovyShellEvaluate.eval(GroovyShellEvaluate.java:170)
	at com.qlangtech.tis.extension.util.GroovyShellEvaluate.lambda$scriptEval$0(GroovyShellEvaluate.java:130)
	at com.qlangtech.tis.trigger.util.JsonUtil$UnCacheString.getValue(JsonUtil.java:114)
	... 122 more
Caused by: java.lang.RuntimeException: TableNotFoundException{tableName='LOGMINER_TBS.STUDENT_INFO'}
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.getTableMetadata(BasicDataSourceFactory.java:120)
	at com.qlangtech.tis.plugin.datax.common.BasicDataXRdbmsReader.getTableMetadata(BasicDataXRdbmsReader.java:282)
	at com.qlangtech.tis.plugin.datax.SelectedTab.lambda$getContextTableCols$2(SelectedTab.java:198)
	at java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
	at com.qlangtech.tis.extension.impl.SuFormProperties$SuFormGetterContext.getContextAttr(SuFormProperties.java:261)
	at com.qlangtech.tis.plugin.datax.SelectedTab.getContextTableCols(SelectedTab.java:196)
	at com.qlangtech.tis.plugin.datax.SelectedTab.getColsCandidate(SelectedTab.java:109)
	at com.qlangtech.tis.plugin.datax.SelectedTab$getColsCandidate.call(Unknown Source)
	at Script7.run(Script7.groovy:1)
	at com.qlangtech.tis.extension.util.GroovyShellEvaluate.eval(GroovyShellEvaluate.java:168)
	... 124 more
Caused by: TableNotFoundException{tableName='LOGMINER_TBS.STUDENT_INFO'}
	at com.qlangtech.tis.plugin.ds.DataSourceFactory.parseTableColMeta(DataSourceFactory.java:162)
	at com.qlangtech.tis.plugin.ds.DataSourceFactory.lambda$parseTableColMeta$0(DataSourceFactory.java:236)
	at com.qlangtech.tis.plugin.ds.DataSourceFactory.validateConnection(DataSourceFactory.java:94)
	at com.qlangtech.tis.plugin.ds.DataSourceFactory.parseTableColMeta(DataSourceFactory.java:235)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.parseTableColMeta(BasicDataSourceFactory.java:140)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.lambda$getTableMetadata$1(BasicDataSourceFactory.java:110)
	at com.qlangtech.tis.plugin.ds.DBConfig.vistDbName(DBConfig.java:127)
	at com.qlangtech.tis.plugin.ds.BasicDataSourceFactory.getTableMetadata(BasicDataSourceFactory.java:109)
	... 133 more
@baisui1981 baisui1981 added bug Something isn't working 3.6.0-alpha labels Oct 26, 2022
@baisui1981
Copy link
Member Author

原因是 oracle的 tablespace_name 不能作为 db来用

SELECT tablespace_name ||'.'||  (TABLE_NAME) FROM user_tables WHERE REGEXP_INSTR(TABLE_NAME,'[\\.$]+') < 1 AND tablespace_name is not null
---改成如下即可
SELECT  (TABLE_NAME) FROM user_tables WHERE REGEXP_INSTR(TABLE_NAME,'[\.$]+') < 1 AND tablespace_name is not null

baisui1981 added a commit to qlangtech/DataX that referenced this issue Oct 27, 2022
baisui1981 added a commit to qlangtech/plugins that referenced this issue Oct 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.6.0-alpha bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant