java - driver connection problems using hibernate with oracle -
i'm new using hibernate, i'm getting problems when try connect oracle database. i'm following step step this tutorial, here in creating hibernate reverse engineering file got errors when oracle driver tried establish connection. exact error:

this 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> maybe need set jdbc oracle driver somewhere don't know where. idea of wrong?
thanks in advance!!
the oracle driver not in classpath. need go oracle site , download oracle thin driver. here page 11g:
http://www.oracle.com/technetwork/apps-tech/jdbc-112010-090769.html
here netbeans instructions talking oracle:
https://netbeans.org/kb/docs/ide/oracle-db.html#oci
you'll have install oracle database instant client first , make sure ojdbc6.jar file on classpath.
Comments
Post a Comment