Oracle Connector: Unable to connect: Failed to resolve Oracle database version

100 views
Skip to first unread message

prasad kagitha

unread,
Dec 19, 2021, 5:18:39 AM12/19/21
to debezium
Hi All,

I am trying to connect to Oracle database with debezium OracleConnector, but i am getting below error

"Unable to connect: Failed to resolve Oracle database version"

java.lang.RuntimeException: Failed to resolve Oracle database version
        at io.debezium.connector.oracle.OracleConnection.resolveOracleDatabaseVersion(OracleConnection.java:163)
        at io.debezium.connector.oracle.OracleConnection.<init>(OracleConnection.java:75)
        at io.debezium.connector.oracle.OracleConnector.validateConnection(OracleConnector.java:74)
        at io.debezium.connector.common.RelationalBaseSourceConnector.validate(RelationalBaseSourceConnector.java:52)
        at org.apache.kafka.connect.runtime.AbstractHerder.validateConnectorConfig(AbstractHerder.java:400)
        at org.apache.kafka.connect.runtime.AbstractHerder.lambda$validateConnectorConfig$2(AbstractHerder.java:351)
        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.sql.SQLException: No suitable driver found for jdbc:oracle:thin:@xxxxxx
        at java.sql.DriverManager.getConnection(DriverManager.java:689)
        at java.sql.DriverManager.getConnection(DriverManager.java:208)
        at io.debezium.jdbc.JdbcConnection.lambda$patternBasedFactory$0(JdbcConnection.java:185)
        at io.debezium.jdbc.JdbcConnection$ConnectionFactoryDecorator.connect(JdbcConnection.java:122)
        at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:891)
        at io.debezium.jdbc.JdbcConnection.connection(JdbcConnection.java:886)
        at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:639)
        at io.debezium.jdbc.JdbcConnection.queryAndMap(JdbcConnection.java:513)
        at io.debezium.connector.oracle.OracleConnection.resolveOracleDatabaseVersion(OracleConnection.java:133)

I have tried placing ojdbc8.jar and also tried with ojdbc10.jar to connector libs but nothing working, i could able to connect to the database from my system with any database client but while trying to connect through connector getting issues.


**Please find my configuration using below**
{
    "name": "oracle-connector",
    "config": {
        "connector.class": "io.debezium.connector.oracle.OracleConnector",
        "database.hostname": "xxx",
        "database.port":"1521",
        "database.user": "xxx",
        "database.password": "xxx",
        "database.server.id": "184054",
        "database.server.name": "oracle",      
        "database.dbname": "xxx",
        "database.pdb.name": "",
        "database.include.list":"xxx",
        "database.out.server.name":"test.game",
        "include.schema.changes": "true",
        "database.history.kafka.bootstrap.servers": "localhost:9092",
        "database.history.kafka.topic": "test.game",
        "tasks.max" : "1"
    }
}

Can any one help me on resolving this issue.
Reply all
Reply to author
Forward

Gunnar Morling

unread,
Dec 22, 2021, 4:30:28 AM12/22/21
to debezium
Definitely use ojdbc8 not ojdbc10. Can you share the contents (output of ls or tree) of your Oracle connector directory?

Thanks,

--Gunnar
Message has been deleted

Chris Cranford

unread,
Jan 2, 2022, 7:17:26 AMJan 2
to debe...@googlegroups.com, prasad kagitha
Hi Prasad -

First, only ojdbc8.jar is compatible so make sure you only use that one.  If it doesn't work by being put in the libs folder, could you put it next to the Oracle connector libraries to see if that helps?
--
You received this message because you are subscribed to the Google Groups "debezium" group.
To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/61d61afd-27c0-4265-9687-3910d2e459dbn%40googlegroups.com.

prasad kagitha

unread,
Jan 2, 2022, 9:55:59 AMJan 2
to debezium
Hi Chris,

Thank you for your response, 

Even i have tried that option as well, and also i have place ojdbc8.jar in kafka libs as well, but still getting same error

I could see ojdbc8.jar is getting loaded to jvm classpath when i start connector, but could not understand why i am getting the error when connecting to oracle db installed in local machine only.

Capture.PNG

jiri.p...@gmail.com

unread,
Jan 2, 2022, 11:56:56 PMJan 2
to debezium
Hi,

just in case could you please try to look into the JAR file to verify it is valid JAR?

J.

prasad kagitha

unread,
Jan 3, 2022, 3:28:04 AMJan 3
to debezium
Yes, I did

It has oracle.jdbc.OracleDriver

jiri.p...@gmail.com

unread,
Jan 4, 2022, 1:18:10 AMJan 4
to debezium
ok, could you please post the result of tree command in Kafka directory and the plugin.path setting?

Thanks

J.

Reply all
Reply to author
Forward
0 new messages