Когда я создаю исходный разъем kafka jdb c (разъем debezium для oracle с confluent-5.4.0), появляются ошибки "Не найден подходящий драйвер для jdb c: oracle: oci ..." .
[2020-03-23 11:49:44,521] ERROR WorkerSourceTask{id=debezium-souce-inventory-0} Task threw an uncaught and unrecoverable exception (org.apache.kafka.connect.runtime.WorkerTask:179)
org.apache.kafka.connect.errors.ConnectException: An exception ocurred in the change event producer. This connector will be stopped.
at io.debezium.connector.base.ChangeEventQueue.throwProducerFailureIfPresent(ChangeEventQueue.java:170)
at io.debezium.connector.base.ChangeEventQueue.poll(ChangeEventQueue.java:151)
at io.debezium.connector.oracle.OracleConnectorTask.poll(OracleConnectorTask.java:110)
at org.apache.kafka.connect.runtime.WorkerSourceTask.poll(WorkerSourceTask.java:265)
at org.apache.kafka.connect.runtime.WorkerSourceTask.execute(WorkerSourceTask.java:232)
at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:177)
at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:227)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.RuntimeException: java.sql.SQLException: No suitable driver found for jdbc:oracle:oci:@test:1521/testdb
at io.debezium.relational.RelationalSnapshotChangeEventSource.execute(RelationalSnapshotChangeEventSource.java:179)
at io.debezium.pipeline.ChangeEventSourceCoordinator.lambda$start$0(ChangeEventSourceCoordinator.java:83)
... 5 more
Caused by: java.sql.SQLException: No suitable driver found for jdbc:oracle:oci:@test:1521/testdb
at java.sql.DriverManager.getConnection(DriverManager.java:689)
at java.sql.DriverManager.getConnection(DriverManager.java:247)
at io.debezium.connector.oracle.OracleConnectionFactory.connect(OracleConnectionFactory.java:25)
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:756)
at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:751)
at io.debezium.relational.RelationalSnapshotChangeEventSource.execute(RelationalSnapshotChangeEventSource.java:119)
... 6 more
[2020-03-23 11:49:44,521] ERROR WorkerSourceTask{id=debezium-souce-inventory-0} Task is being killed and will not recover until manually restarted (org.apache.kafka.connect.runtime.WorkerTask:180)
Моя oracle версия - Enterprise Edition Release 11.2.0.4.0 - 64-разрядная версия, я пробовал другой драйвер jar, но получаю то же исключение.
Моя версия jdk :
[root@vtsz-big-dwh02 /]# echo $JAVA_HOME
/usr/java/jdk1.8.0_191
Я добавил debezium-connector- oracle в папку confluent-5.4.0 / share / java.
Как говорят документы Debezium, я устанавливаю мгновенно клиента и скопируйте файлы _ojbc8.jar и xtreams.jar из Instant Client в директорию Кафки
directiry (confluent-5.4.0/share/java/kafka
, confluent-5.4.0/share/java/kafka-connect-jdbc ,
/ opt / confluent-5.4.0 / lib ,
/ usr / share / java`).
[root@vtsz-big-dwh02 java]# echo $LD_LIBRARY_PATH
/home/app/instantclient_11_2/:
Моя конфигурация коннекторов источника:
{
"name": "debezium-souce-idea-inventory",
"config": {
"connector.class": "io.debezium.connector.oracle.OracleConnector",
"tasks.max": "1",
"database.server.name":"testdb",
"database.out.server.name":"testdb",
"database.hostname": "10.0.10.169",
"database.port": "1521",
"database.user": "mytest",
"database.password": "mytest",
"database.dbname" : "testdb",
"table.whitelist": "ideas.WMS_INVENTORY",
"database.history.kafka.bootstrap.servers":"localhost:9092",
"database.history.kafka.topic":"schema-changes.inventory"
}
}