Hello,
I am just a starter on hibernate. I am going thru the tutorial on hibernate.org. Only thing I am doing different is, Oracle 10g, express edition. On execution I am getting this error below. I defined the right JDBC url, still it is picking up wrong SID.
---------------------------------------------------------------------------------------------------------
21:53:55,125 INFO SessionFactoryImpl:161 - building session factory
21:53:55,484 INFO SessionFactoryObjectFactory:82 - Not binding factory to JNDI, no JNDI name configured
21:53:55,625 WARN JDBCExceptionReporter:77 - SQL Error: 0, SQLState: null
21:53:55,625 ERROR JDBCExceptionReporter:78 - Listener refused the connection with the following error:
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor
The Connection descriptor used by the client was:
localhost:1521:orcl
Exception in thread "main" org.hibernate.exception.GenericJDBCException: Cannot open connection
at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:29)
at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:424)
at org.hibernate.jdbc.ConnectionManager.getConnection(ConnectionManager.java:144)
-------------------------------------------------------------------------------------
My config files look like this
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin://localhost:1521:XE</property>
<property name="connection.username">event</property>
<property name="connection.password">event</property>
<!-- JDBC connection pool (use the built-in) -->
<property name="connection.pool_size">1</property>
<!-- SQL dialect -->
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<!-- Enable Hibernate's automatic session context management -->
<property name="current_session_context_class">thread</property>
<!-- Disable the second-level cache -->
<property name="cache.provider_class">org.hibernate.cache.NoCacheProvider</property>
_________________ Its coming you will see.
|