Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ORA-28040: No matching authentication protocol exception when using groovy.sql package with oracle12c

I am trying to connect to oracle12c database using groovy.sql.Sql

Sql sql = Sql.newInstance('jdbc:oracle:thin:@'+hostName:port/serviceName, dbUser, dbPassword, 'oracle.jdbc.driver.OracleDriver')

and it returns

java.sql.SQLException: ORA-28040: No matching authentication protocol

I guess, this is because of the dialect mismatch.

It works fine with oracle11g, but not with 12c. If it is a problem with dialect, how can we externally specify dialect to groovy.sql.Sql. If not, what could be the problem/solution?

I'm using ojdbc14 driver.

like image 289
Syam Avatar asked Aug 05 '14 16:08

Syam


1 Answers

The ojdbc14 is a relatively old driver and that could be the problem. I would recommend trying ojdbc6 and see if that fixes your problem.

Note that this appeared to fix a similar problem based on information in the comments in this SO question ORA-28040: No matching authentication protocol exception.

like image 70
John Wagenleitner Avatar answered Nov 18 '22 23:11

John Wagenleitner