cancel
Showing results for 
Search instead for 
Did you mean: 

xdb No suitable driver found for jdbc:oracle:thin ERROR

SOLVED
Gold Adventurer

xdb No suitable driver found for jdbc:oracle:thin ERROR

I try to use XDB replication tool to replicate ORACLE to postgres EDB, and i copy the JDBC driver ojdbc5.jar to JAVA_HOME(/usr/lib/jvm/jre/lib/ext) and to XDB_HOME(/opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc)

when i try to connect i get this ERROR:

 

Database connection information test failed.
No suitable driver found for jdbc:oracle:thin:@//myIP:1521/myname

error.jpg

 

 

 

I'm missing something?

any idea

regards

1 ACCEPTED SOLUTION

Accepted Solutions
Gold Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

i copy others jdbc

ojdbc6.jar

ojdbc7.jar

ojdbc5.jar

ojdbc14.jar

 

and work

 

thanks

View solution in original post

15 REPLIES 15
Level 3 Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi asotolongo,

 

Hope you are doing good..

 

Could you please share the output of ls -ltr command , from your JAVA_HOME (/usr/lib/jvm/jre/lib/ext) and XDB_HOME (/opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc) location.
Is your publication and subscription server running on same server ?
You can refer to the below link for more information regarding this.
https://www.enterprisedb.com/docs/en/6.0/repguide/EDB_Postgres_Replication_Server_Users_Guide.1.24.h...

 

Thanks ,

Swagata 

Gold Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

HI Swagata,thanks for your answer, 

i readed the documentation refered 

https://www.enterprisedb.com/docs/en/6.0/repguide/EDB_Postgres_Replication_Server_Users_Guide.1.24.h...

 

is your publication and subscription server running on same server ?- YES

 

ls -ltr /usr/lib/jvm/jre/lib/ext

pantalla1_lrt.png

 

ls -lrt /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc

 

pantalla2_lrt.png

 

With SQL server function fine!!!

 

i use CENTOS 7

Regards

 

Gold Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

i copy others jdbc

ojdbc6.jar

ojdbc7.jar

ojdbc5.jar

ojdbc14.jar

 

and work

 

thanks

View solution in original post

Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

I am getting the same error and have no ideas

I am using  xDB server 6.2.5, 

OS:redhat 7.4,

jre :OpenJDK 1.7.0
ojdbc7.jar
oracle  12.1.0.2 EE

 

Please help

Level 3 Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi justicehlaps,

 

Could you please share the output of ls -ltrh of XDB_HOME/lib/jdbc directory and JAVA_HOME (/usr/lib/jvm/jre/lib/ext) .
Please refer the below link for more information regarding access to Oracle database.
https://www.enterprisedb.com/docs/en/6.2/repguide/EDB_Postgres_Replication_Server_Users_Guide.1.24.h...

 

Thanks,
Swagata

 

Highlighted
Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Dear Swagata,

thanks for the response,

see my  java configs on the subscriber below.

ojdbc_config.PNG

Tags (1)
Level 3 Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi justicehlaps,

 

Could you please confirm if the publication and subscription server are installed on the same host?

If subscription server is running on a different host than the publication server then you need to copy the ojdbcX.jar file to
XDB_HOME/lib/jdbc and jre/lib/ext location on the subscription server host as well.

Also, restart the publication and subscription service. Let us know how it helps.

Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi Swagata,

Thank you for the feedback.

I did that already and i had no joy.My publisher is running on a different host

find the settings on my publisher as per screenshot below

ojdbc_config_publisher.PNG

Level 3 Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi justicehlaps,

 

Could you please try once using ojdbc8.jar file in both subscription and publiation server. And, restart the publication and subscription service. 

 

Let us know if it works.

 

Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi Swagata,

 

I have switch java on OS to java 8, copied the ojdbc8.jar  accordingly on both the subscriber and publisher,restarted both the servers.

I am still having issues

Let me know

 

Regards,

Level 3 Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi justicehlaps,

 

Could you please check the output of below commands :
# java -version

If its is set to java version "1.7.0_51" . Please run the below command and select the java-1.8 option.
# alternatives --config java

From previously shared screenshot we could see that the 'Selection' should be 1 for Java 1.8 in your server.

For example:
# alternatives --config java

There is 1 program that provides 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java

Enter to keep the current selection[+], or type selection number: 1


Again check the java version.

Now under the below two location place the ojdbc8.jar file.
1. <JAVA_HOME>/jre/lib/ext (Java 1.8)
2. <XDB_HOME>/lib/jdbc

Follow the above steps for both the publication and subscription server and then restart the publication and subscription services.

 

If you are still facing the same problem please share the below information to check further:
# java -version
# ls -ltr <JAVA_HOME>/jre/lib/ext
# ls -ltr <XDB_HOME>/lib/jdbc
# The command you are using and the error screenshot.

 

Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi Swagata,

 

Thank you for your interest in the issue.

I have attached several screenshot for you to grasp my configuration possibly assist in finding the root cause.

I am still getting the "No suitable driver found issue"

ojdbc8_config_publisher_1.PNGpublisher_config1ojdbc8_config_publisher_2.PNGpublisher_config2ojdbc8_config_subscriber_1.PNGsubscriber_configrepconsole_publication_server.PNGrepconsole_1repconsole_subscription_server.PNGrepconsole2smr_creation_failure.PNGsmr_failure_1smr_creation_failure_2.PNGsmr_failure_exception

Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR


@SwagataBanik wrote:

Hi justicehlaps,

 

Could you please check the output of below commands :
# java -version

If its is set to java version "1.7.0_51" . Please run the below command and select the java-1.8 option.
# alternatives --config java

From previously shared screenshot we could see that the 'Selection' should be 1 for Java 1.8 in your server.

For example:
# alternatives --config java

There is 1 program that provides 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java

Enter to keep the current selection[+], or type selection number: 1


Again check the java version.

Now under the below two location place the ojdbc8.jar file.
1. <JAVA_HOME>/jre/lib/ext (Java 1.8)
2. <XDB_HOME>/lib/jdbc

Follow the above steps for both the publication and subscription server and then restart the publication and subscription services.

 

If you are still facing the same problem please share the below information to check further:
# java -version
# ls -ltr <JAVA_HOME>/jre/lib/ext
# ls -ltr <XDB_HOME>/lib/jdbc
# The command you are using and the error screenshot.

 



Hi Swagata,

 

Thank you for your interest in the issue.

I have attached several screenshot for you to grasp my configuration possibly assist in finding the root cause.

I am still getting the "No suitable driver found issue"

ojdbc8_config_publisher_1.PNGpublisher_config1ojdbc8_config_publisher_2.PNGpublisher_config2ojdbc8_config_subscriber_1.PNGsubscriber_configrepconsole_publication_server.PNGrepconsole_1repconsole_subscription_server.PNGrepconsole2smr_creation_failure.PNGsmr_failure_1smr_creation_failure_2.PNGsmr_failure_exception

Level 3 Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Hi justicehlaps,

 

I did the below set up and tested the scenario at my end. I also got the same "driver not found" erro at first. Following the below steps it got solved.

1. Oracle installed on server A.
2. XDB and the subscription database(EPAS 10)installed on server B.

On the server B , copied the ojdbc8.jar in the below two locations.

/opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc/ -> (<XDB_HOME>/lib/jdbc/)
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/lib/ext/ ->(<JAVA_HOME/lib/ext>)

 

Please check the permission on the files:

[root@localhost OJDBC8-Full]# cd /opt/PostgreSQL/EnterpriseDB-xDBReplicationServer/lib/jdbc/
[root@localhost jdbc]# ls -ltr
-rw-r--r--. 1 root root 708602 Feb 5 06:11 postgresql-42.1.4.jre7.jar
-rw-r--r--. 1 root root 317816 Feb 5 06:11 jtds-1.3.1.jar
-rw-r--r--. 1 root root 840043 Feb 5 06:11 edb-jdbc17.jar
-rw-r--r--. 1 root root 4036257 May 16 04:36 ojdbc8.jar

[root@localhost jdbc]# cd /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64/jre/lib/ext/
[root@localhost ext]# ls -ltr
-rw-r--r--. 1 root root 78005 Apr 17 09:47 zipfs.jar
-rw-r--r--. 1 root root 273119 Apr 17 09:47 sunpkcs11.jar
-rw-r--r--. 1 root root 299708 Apr 17 09:47 sunjce_provider.jar
-rw-r--r--. 1 root root 30710 Apr 17 09:47 sunec.jar
-rw-r--r--. 1 root root 2033510 Apr 17 09:47 nashorn.jar
-rw-r--r--. 1 root root 1204599 Apr 17 09:47 localedata.jar
-rw-r--r--. 1 root root 48733 Apr 17 09:47 jaccess.jar
-rw-r--r--. 1 root root 9445 Apr 17 09:47 dnsns.jar
-rw-r--r--. 1 root root 4003855 Apr 17 09:47 cldrdata.jar
-rw-r--r--. 1 root root 617 Apr 17 09:47 meta-index
lrwxrwxrwx. 1 root root 48 May 16 03:56 java-atk-wrapper.jar -> /usr/lib64/java-atk-wrapper/java-atk-wrapper.jar
-rw-r--r--. 1 root root 4036257 May 16 04:34 ojdbc8.jar


And then restarted the edb-xdbpubserver.service ,edb-xdbsubserver.service using ssytemctl. (I am using CentOS 7)
[root@localhost system]# systemctl start edb-xdbpubserver.service

 

And the issue got solved. Could you please check the permission of the files and let me know how that helps.

 

Adventurer

Re: xdb No suitable driver found for jdbc:oracle:thin ERROR

Dear Swagata,

 

I have changed the permisions of the  ojdbc file accorndingly and it is working

Thank you for your dedication

 

Regards,

Justice