org.xeril.util.tx.TransactionException: java.sql.SQLException: ORA-28040: No matching authentication protocol
I don't use oracle DB that often but it seems like there are many solutions on the web that are addressing this issue and I don't think most of them have clear instructions.
The reason why you may be getting org.xeril.util.tx.TransactionException: java.sql.SQLException: ORA-28040: No matching authentication protocol error is because your client library e.g., JDBC jar (if your lang is java) is old. As these older libraries may not know the newer protocols that oracle has implemented. To fix this you have a couple of options
Use a newer version of the library that can support the newer authentication protocols
Downgrade the protocol version in your oracle server (if you are not allowed to use a newer version of the library, for some obvious or nonobvious reason)
To downgrade the protocol version in your oracle server, do the following
Note 1: I Will be using the official docker oracle server image for this post
Note 2: Very important to note is that you should create the users only after making the following changes and any users that are created before this will not work even with this change.
Start the docker image (skip if you already have an Oracle server up and running)
docker run -d -h localdomain --name oracle -p 1521:1521 -p 5500:5500 -e DB_SID=ORCLCDB -e DB_PDB=ORCLPDB1 -e DB_DOMAIN=localdomain store/oracle/database-enterprise:12.2.0.1-slim
Update the sqlnet.ora file to include the following config
SQLNET.ALLOWED_LOGON_VERSION = 8 SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8 SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
Note: 8 is the protocol version I needed and you may need a different version.
After all these changes, your config may look like this
docker exec -it oracle bash [oracle@localdomain /]$ cd $TNS_ADMIN [oracle@localdomain ORCLCDB]$ ls listener.ora sqlnet.ora tnsnames.ora xdb_wallet [oracle@localdomain ORCLCDB]$ cat sqlnet.ora NAME.DIRECTORY_PATH= {TNSNAMES, EZCONNECT, HOSTNAME} SQLNET.EXPIRE_TIME = 10 SSL_VERSION = 1.0 SQLNET.ALLOWED_LOGON_VERSION = 8 SQLNET.ALLOWED_LOGON_VERSION_CLIENT = 8 SQLNET.ALLOWED_LOGON_VERSION_SERVER = 8
Restart the Oracle server
docker restart oracle
At this point you are ready, create the users and schema needed to ensure that you should not face this problem anymore









