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

Syam picture Syam · Aug 5, 2014 · Viewed 18.5k times · Source

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.

Answer

John Wagenleitner picture John Wagenleitner · Aug 5, 2014

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.