curio wrote:
it seems you have the "wrong" Session ...
Code:
org/hibernate/classic/Session
The classic-package is for the old apis ... perhaps the wrong session-Implementation/Interface in JNDI?
Thank for your response.
When I print the sessionFactory stored in jndi, it prints:
Code:
org.hibernate.impl.SessionFactoryImpl@247418
Here is my config file:
Code:
<!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="HibernateFactory">
<property name="show_sql">true</property>
<property name="dialect">org.hibernate.dialect.MySQLDialect</property>
<property name="hibernate.connection.datasource">TestManagerDS</property>
<property name="transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="jta.UserTransaction">javax.transaction.UserTransaction</property>
<property name="hibernate.cache.use_second_level_cache">false</property>
<property name="transaction.manager_lookup_class">org.hibernate.transaction.JOTMTransactionManagerLookup</property>
<mapping resource="test/model/bean/Test.hbm.xml"/>
</session-factory>
</hibernate-configuration>