apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
8.04k stars 1.82k forks source link

[Bug] [Oracle-CDC] Get error: ClasspathURLStreamHandlerProvider not found in version 2.3.6 #7397

Closed alvinkam closed 2 months ago

alvinkam commented 3 months ago

Search before asking

What happened

Get the error message "ClasspathURLStreamHandlerProvider not found" while run the Oracle-CDC job

image

SeaTunnel Version

version 2.3.6

SeaTunnel Config

env {
  job.name = "OracleCDCTesting"
  job.mode = "STREAMING"
  parallelism = 1
  checkpoint.interval = 10000
  read_limit.bytes_per_second = 7000000
  read_limit.rows_per_second = 400
}

source {
  Oracle-CDC {
    base-url="jdbc:oracle:thin:@192.168.0.206:1521/ORCL",
    username="LOGMINER"
    password="Abcd1234"
    database-names=["ORCL"]
    schema-names=["DB_SRC"]
    table-names=["ORCL.DB_SRC.TEST1"]
    result_table_name="customers"
    source.reader.close.timeout = 120000
    connection.pool.size = 1
  }
}

transform {
}

sink {
  Console {
    source_table_name = "customers"
  }
}

Running Command

cd /opt/seatunnel
bash ./bin/seatunnel.sh -e local --config ./config/ora1

Error Exception

Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
    at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:211)
    at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
    at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
Caused by: org.apache.seatunnel.api.table.factory.FactoryException: ErrorCode:[API-06], ErrorDescription:[Factory initialize failed] - Unable to create a source for identifier 'Oracle-CDC'.
    at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:101)
    at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parseSource(MultipleTableJobConfigParser.java:361)
    at org.apache.seatunnel.engine.core.parse.MultipleTableJobConfigParser.parse(MultipleTableJobConfigParser.java:209)
    at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.getLogicalDag(ClientJobExecutionEnvironment.java:114)
    at org.apache.seatunnel.engine.client.job.ClientJobExecutionEnvironment.execute(ClientJobExecutionEnvironment.java:182)
    at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:158)
    ... 2 more
Caused by: java.util.ServiceConfigurationError: java.net.spi.URLStreamHandlerProvider: Provider org.infinispan.commons.jdkspecific.ClasspathURLStreamHandlerProvider not found
    at java.base/java.util.ServiceLoader.fail(ServiceLoader.java:588)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.nextProviderClass(ServiceLoader.java:1211)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNextService(ServiceLoader.java:1220)
    at java.base/java.util.ServiceLoader$LazyClassPathLookupIterator.hasNext(ServiceLoader.java:1264)
    at java.base/java.util.ServiceLoader$2.hasNext(ServiceLoader.java:1299)
    at java.base/java.util.ServiceLoader$3.hasNext(ServiceLoader.java:1384)
    at java.base/java.net.URL$1.getNext(URL.java:1266)
    at java.base/java.net.URL$1.hasNext(URL.java:1281)
    at java.base/java.net.URL$2.run(URL.java:1307)
    at java.base/java.net.URL$2.run(URL.java:1304)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.base/java.net.URL.lookupViaProviders(URL.java:1303)
    at java.base/java.net.URL.getURLStreamHandler(URL.java:1388)
    at java.base/java.net.URL.<init>(URL.java:633)
    at java.base/java.net.URL.<init>(URL.java:523)
    at java.base/java.net.URL.<init>(URL.java:470)
    at java.base/javax.crypto.JceSecurity.<clinit>(JceSecurity.java:239)
    at java.base/javax.crypto.SecretKeyFactory.nextSpi(SecretKeyFactory.java:303)
    at java.base/javax.crypto.SecretKeyFactory.<init>(SecretKeyFactory.java:121)
    at java.base/javax.crypto.SecretKeyFactory.getInstance(SecretKeyFactory.java:168)
    at oracle.jdbc.driver.T4C8TTIdty.<init>(T4C8TTIdty.java:534)
    at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1542)
    at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:518)
    at oracle.jdbc.driver.PhysicalConnection.connect(PhysicalConnection.java:688)
    at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:39)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:691)
    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:677)
    at java.sql/java.sql.DriverManager.getConnection(DriverManager.java:228)
    at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.getConnection(AbstractJdbcCatalog.java:119)
    at org.apache.seatunnel.connectors.seatunnel.jdbc.catalog.AbstractJdbcCatalog.open(AbstractJdbcCatalog.java:129)
    at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.lambda$getCatalogTables$0(CatalogTableUtil.java:122)
    at java.base/java.util.Optional.map(Optional.java:265)
    at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:118)
    at org.apache.seatunnel.api.table.catalog.CatalogTableUtil.getCatalogTables(CatalogTableUtil.java:98)
    at org.apache.seatunnel.connectors.seatunnel.cdc.oracle.source.OracleIncrementalSourceFactory.lambda$createSource$1(OracleIncrementalSourceFactory.java:108)
    at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:113)
    at org.apache.seatunnel.api.table.factory.FactoryUtil.createAndPrepareSource(FactoryUtil.java:74)
    ... 7 more

Zeta or Flink or Spark Version

zeta version

Java or Scala Version

Java: jdk-11.0.24 Scala: 2.13.13

Screenshots

image

Are you willing to submit PR?

Code of Conduct

Carl-Zhou-CN commented 3 months ago

Could the oracle jdbc driver version be the cause?

alvinkam commented 2 months ago

Issue was fixed by change the jdk version from 11.0.24 to 1.8.0_181