Need help with Hibernate? Read this first:
http://www.hibernate.org/ForumMailingli ... AskForHelp
Hibernate version: 3
Mapping documents:
<hibernate-configuration>
<session-factory>
<!-- Database connection settings -->
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@localhost:1525:XE</property>
<!-- property name="hibernate.connection.driver_class" / -->
<property name="hibernate.connection.username">***</property>
<property name="hibernate.connection.password">***</property>
<!-- property name="hibernate.connection.pool_size"></property-->
<!-- dialect for Oracle (any version) -->
<!-- property name="dialect">net.sf.hibernate.dialect.OracleDialect</property -->
<property name="dialect">org.hibernate.dialect.OracleDialect</property>
<property name="hibernate.show_sql">false</property>
<property name="hibernate.use_outer_join">true</property>
<property name="hibernate.transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<mapping resource="events/Event.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Code between sessionFactory.openSession() and session.close():
Full stack trace of any exception that occurs:
[java] Initial SessionFactory creation failed.org.hibernate.HibernateException: TransactionFactory class not found: net.sf.hibernate.transaction.JTATransactionFactory
[java] Exception in thread "main" java.lang.ExceptionInInitializerError
[java] at util.HibernateUtil.<clinit>(Unknown Source)
[java] at events.EventManager.listEvents(Unknown Source)
[java] at events.EventManager.main(Unknown Source)
[java] Caused by: org.hibernate.HibernateException: TransactionFactory class not found: net.sf.hibernate.transaction.JTATransactionFactory
[java] at org.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(TransactionFactoryFactory.java:41)
[java] at org.hibernate.cfg.SettingsFactory.createTransactionFactory(SettingsFactory.java:418)
[java] at org.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:138)
[java] at org.hibernate.cfg.Configuration.buildSettings(Configuration.java:2009)
[java] at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1292)
Name and version of the database you are using:
Oracle 10g XE
The generated SQL (show_sql=true):
Debug level Hibernate log excerpt:
Hello,
New to hibernate. Trying to follow the example in the documentation. Got it working with the hsqldb database, however would like to get it working with Oracle. Getting the following exception when trying to run the chapter 1 example. Is there something wrong with the configuration?
I have the Hibernate3 jar file in the path.
Thanks