0
我很新使用hibernate,所以當我嘗試連接到Oracle數據庫時遇到問題。我正在按照步驟this教程,但here在Creating the Hibernate Reverse Engineering File
我得到了一些錯誤時,oracle驅動程序試圖建立連接。這是確切的錯誤:使用休眠與oracle的驅動程序連接問題
這是我的hibernate.cfg.xml:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN" "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1521:orcl</property>
<property name="hibernate.connection.username">hotel</property>
<property name="hibernate.connection.password">hotel</property>
<property name="hibernate.show_sql">true</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
</session-factory>
</hibernate-configuration>
也許我需要的地方設置JDBC Oracle驅動程序,但我完全不知道的地方。任何想法可能是錯的?
在此先感謝!