0

I am able to run Oracle DB via VirtualBox and SQLDeveloper on Mac osx. But the problem is, getting below error while connecting Java App with Oracle DB.

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

my configuration file is like

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
        "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
   <session-factory>
       <property name = "hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
      <!-- hibernate is optional in key names  -->
          <property name = "hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
             
      <!-- Assume test is the database name -->
      <property name = "hibernate.connection.url">jdbc:oracle:thin:@localhost:1521/orcl</property>
      <property name = "hibernate.connection.username">hr</property>
      <property name = "hibernate.connection.password">oracle</property>
         
      <!-- List of XML mapping files -->
      <mapping resource = "com/visionforth/entity/Student.hbm.xml"/>
   </session-factory>
</hibernate-configuration>

And created logical connection like image below

enter image description here

Please help how to resolve the problem.

SternK
  • 11,649
  • 22
  • 32
  • 46
  • Using compatible ojdbc library may resolve the error. – KVS Jun 12 '21 at 15:23
  • Try this as the value for `hibernate.connection.url` property: `jdbc:oracle:thin:@//localhost:1521/orcl` Also make sure you are using a suitable JDBC driver. Refer to [Oracle JDBC FAQ](https://www.oracle.com/database/technologies/faq-jdbc.html) – Abra Jun 12 '21 at 16:06
  • Hey @Sterkn, I have tried with ojdbc14 and ojdbc6. Problem remains same. And all available solution works for Windows only. I am struggling with Mac OSX. – Satish Rajput Jun 13 '21 at 03:43

0 Answers0