Hi all. I'm jumping into Hibernate for my first time, and my first trick would be to get a command line program working that does some siimple operations. Unfortunately, when I try to start up my main class, i get the exception about the transactionmanager. I've heard people don't have problems w/ this, so it must be my environment.
Libs present are all libs included in the standard hibernate distrib + the oracle driver.
Here's my config file...
Code:
<?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
name="java:hibernate/SessionFactory">
<property name="hibernate.connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.url">jdbc:oracle:thin:@somewhere:1521:somewhere</property>
<property name="hibernate.connection.username">sportee1</property>
<property name="hibernate.connection.password">sportee1</property>
<property name="hibernatedialect">org.hibernate.dialect.OracleDialect</property>
<property name="show_sql">true</property>
<property name="transaction.factory_class">org.hibernate.transaction.JDBCTransactionFactory</property>
<property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property>
<property name="hibernate.hbm2ddl.auto">update</property>
</session-factory>
</hibernate-configuration>
Hibernate version: 3.0.3
Mapping documents:none yet
Code between sessionFactory.openSession() and session.close():Just...
sessionFactory = new Configuration().configure().buildSessionFactory();
Full stack trace of any exception that occurs:Code:
org.hibernate.HibernateException: No TransactionManagerLookup specified
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:497)
at com.emeta.solutions.exercise.Exercise$1.initialValue(Exercise.java:34)
at java.lang.ThreadLocal$ThreadLocalMap.getAfterMiss(Unknown Source)
at java.lang.ThreadLocal$ThreadLocalMap.get(Unknown Source)
at java.lang.ThreadLocal$ThreadLocalMap.access$000(Unknown Source)
at java.lang.ThreadLocal.get(Unknown Source)
at com.emeta.solutions.exercise.Exercise.getSession(Exercise.java:40)
at com.emeta.solutions.exercise.CreateCarExercise.main(CreateCarExercise.java:18)
Exception in thread "main"
Name and version of the database you are using:
Oracle 9i
The generated SQL (show_sql=true):
n/a
Debug level Hibernate log excerpt:
All