We have migrated our Oracle database to 12c from 11g. We have a legacy application running in Java 1.5 and using ojdbc14.jar.
Our application is not able to create c
We had this error when we moved from 11g to 12c, I am able to get correct response through tnsping "servername" (this is the first step that we need to check through cmd). After this we realize that database server is enable to handle only 64bit request (In my case I was using WinSQL and it always check for 32bit). So to correct this, ask your admin to eanble server for 32 bit request as well or you can move to SQL developer which work for me.
If you are migrating your application to ojdbc6, one probable reason would be your old classes (compatible to old ojdbc version) might not be getting the class OracleTypes. Easiest way would be changing import statement from import oracle.jdbc.driver.OracleTypes; to import oracle.jdbc.OracleTypes; from the classes where you are getting the error.
I had the same error with 2 different applications recently:
The second solution mentioned in the same post you referred to - worked well for us.
Workaround: Set SQLNET.ALLOWED_LOGON_VERSION=8 in the oracle/network/admin/sqlnet.ora file.
We worked with our DBAs to set the above option on the sqlnet.ora on the database server. This resolved our issue. I hope it helps someone.
After migrating from Oracle 11
to Oracle 12.
In my case lib directory had both OJDBC14.jar
& OJDBC8.jar
.
After removing older OJDBC14.jar it worked for me.
I faced the same error.
Got it resolved by without removing ojdbc14.jar.
step 1 : set SQLNET.ALLOWED_LOGON_VERSION=8
Step 2 : change
Connection conn = (Connection) DriverManager.getConnection("jdbc:oracle:thin:@server:port:sid", "username", "passwrd");
to
java.sql.Connection conn = DriverManager.getConnection("jdbc:oracle:thin:@@server:port:sid", "username", "passwrd");
It will works!
I was getting ORA-28040 in Sqldeveloper (ver. 1.5.5) for all connections. I set SQLNET.ALLOWED_LOGON_VERSION=8 but the error didn't go away. Then I enabled "Use OCI/Thick driver" under Tools->Preferences->Database->Advanced Parameters. That did the trick.