Click here to Skip to main content
15,946,320 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a decade old Java Spring/Hibernate Application which is currently using a Oracle 11g database server, now I wanted it to point to an upgraded server which has Oracle 19c database.

The version of Spring I am using is Spring 3.2.2
Hibernate version is 4.2.14
JDBC Jar I am using is ojdbc14.jar

I have updated the connection string in my application to use the new Oracle 19c DB but unable to connect the new DB and got ORA-28040: No matching authentication protocol error.

Please help me here in upgrading the application to use Oracle 19C.

What I have tried:

1) For Error ORA-28040 with help of Database Analyst we updated the SQLNET.ORA File to add following snippet.
SQLNET.ALLOWED_LOGON_VERSION=12
SQLNET.ALLOWED_LOGON_VERSION_CLIENT=12
SQLNET.ALLOWED_LOGON_VERSION_SERVER=12

But still the error persisted.

2) After this I have searched and found out that I was using org.hibernate.dialect.Oracle10gDialect instead I have to use Oracle12cDialect.

3) But Oracle12CDialect is not available in Hibernate version I am using.

4)I have searched that upgrading Hibernate will fix the dialect issue but newer Hibernate may not be compatible with older version of Spring, so Spring also needed to be upgraded.
Posted

1 solution

The fact that you're using Spring 3.2.2 tells me that you're running, at least, Java 11. As you have identified, you need to update Hibernate, which also means you need to update Spring. To be honest, if you're not maintaining versions in your application, you are doing yourself a disservice because you will likely be open to unpatched critical vulnerabilities[^].
 
Share this answer
 
Comments
Arpan Pal 10-Jul-24 3:04am    
Sorry, I didn't mention the Java version, we are using Java 8 for this application.
Arpan Pal 10-Jul-24 3:07am    
Can you tell me a better and easier method to upgrade the project with new Hibernate and Spring ?
If there is any tool which makes this easier, because I am presuming that I need to update some code syntax as well according to the latest Hibernate and Spring. As the application is deployed and Client doesn't want the change in functionality that is why I am thinking of a solution with minimum change in code.
Pete O'Hanlon 10-Jul-24 3:33am    
There's no automatic way to do the update. You're going to have to fix this manually and run regression tests to make sure that it's behaving the way you would expect.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900