ORA-28040: No matching authentication protocol exc

2020-01-24 11:20发布

I am trying to connect my grails project to Oracle databse(Oracle 12c) in windows(8) system. However, whenever I run my application I get following exception :

Caused by: org.apache.commons.dbcp.SQLNestedException: 
Cannot create PoolableConnectionFactory (ORA-28040: 
No matching authentication protocol)

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

According to internet suggestion I also tried editing my *.ora file but it is not working.

I added following snippet in sqlnet.ora file :

SQLNET.ALLOWED_LOGON_VERSION=10
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=10
SQLNET.ALLOWED_LOGON_VERSION_SERVER=10

Here i tried assigning (10,11,12) but neither of them is working.

Can anyone please help me with this ?

9条回答
迷人小祖宗
2楼-- · 2020-01-24 11:27

Here is some text I found at experts-exchange:

Bug 14575666

In 12.1, the default value for the SQLNET.ALLOWED_LOGON_VERSION parameter has been updated to 11. This means that database clients using pre-11g JDBC thin drivers cannot authenticate to 12.1 database servers unless theSQLNET.ALLOWED_LOGON_VERSION parameter is set to the old default of 8.

This will cause a 10.2.0.5 Oracle RAC database creation using DBCA to fail with the ORA-28040: No matching authentication protocol error in 12.1 Oracle ASM and Oracle Grid Infrastructure environments.

Workaround: Set SQLNET.ALLOWED_LOGON_VERSION=8 in the oracle/network/admin/sqlnet.ora file.

查看更多
Melony?
3楼-- · 2020-01-24 11:30

Adding

SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8

is the perfect solution sql.ora directory ..\product\12.1.0\dbhome_1\NETWORK\ADMIN

查看更多
▲ chillily
4楼-- · 2020-01-24 11:33

I resolved this issue by using ojdbc8.jar. Oracle 12c is compatible with ojdbc8.jar

查看更多
对你真心纯属浪费
5楼-- · 2020-01-24 11:40

I deleted the ojdbc14.jar file and used ojdbc6.jar instead and it worked for me

查看更多
ゆ 、 Hurt°
6楼-- · 2020-01-24 11:40

just install ojdbc-full, That contains the 12.1.0.1 release.

查看更多
倾城 Initia
7楼-- · 2020-01-24 11:41

I was using eclipse and after trying all the other answers it didn't work for me. In the end, what worked for me was moving the ojdb7.jar to top in the Build Path. This occurs when multiple jars have conflicting same classes.

  1. Select project in Project Explorer
  2. Right click on Project -> Build Path -> Configure Build Path
  3. Go to Order and Export tab and select ojdbc.jar
  4. Click button TOP to move it to top
查看更多
登录 后发表回答