java - 在 Mac osx 上将 Java 应用程序与 Oracle 连接
问题描述
我能够在 Mac osx 上通过 VirtualBox 和 SQLDeveloper 运行 Oracle DB。但问题是,在将 Java App 与 Oracle DB 连接时出现错误。
"java.sql.SQLException: ORA-28040: No matching authentication protocol"
我的配置文件就像
<?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>
并创建了如下图所示的逻辑连接
请帮助如何解决问题。
解决方案
推荐阅读
- java - 将 Android 应用从 Native 迁移到 React Native
- image-processing - 是否可以从人类指纹生成哈希?
- java - 在不同风格的android之间导入/重用公共strings.xml
- django - Django中与多对多关系相关的问题
- python - 计算图像的方差
- javascript - 传递多数据 php 和 javascript
- html - 输入时div重复
- android - 如何生成打开 Apple Plan 或 Google Maps 的链接
- dictionary - 我可以有一个功能来检查一个键是否在地图中?
- xml - powershell - 通过 XML 循环创建正确数量的节点,但属性值被捆绑