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

18,699

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.

Share:
18,699
Syam
Author by

Syam

M.Sc. Computer Science

Updated on June 16, 2022

Comments

  • Syam
    Syam almost 2 years

    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.

  • Syam
    Syam almost 10 years
    No, actually I am trying to dynamically connect to some other databases from my application.
  • Syam
    Syam almost 10 years
    Yes, ojdbc6 has fixed the problem