Hi,
I'm new here.
I wanted to upgrade my application to hibernate 3.6.0.Final. So I also upgraded the ehcache to ehcache-core 2.3.0. Now, I'm getting an exception while starting my tests:
Code:
Caused by: java.lang.NoSuchMethodError: net.sf.ehcache.config.Configuration.setDefaultTransactionManager(Ljava/lang/Object;)V
at net.sf.ehcache.hibernate.EhCacheRegionFactory.start(EhCacheRegionFactory.java:70)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:236)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1842)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
I use the JDBC based transaction manager:
Code:
<tx:annotation-driven transaction-manager="mytransactionManager"/>
<bean id="mytransactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory" ref="mySessionFactory" />
</bean>
The configuration of the session factory looks like this:
Code:
<bean id="mySessionFactory" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean">
<property name="dataSource" ref="${...}" />
<property name="annotatedClasses">
<list>
....
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.cache.region.factory_class">net.sf.ehcache.hibernate.EhCacheRegionFactory</prop>
<prop key="hibernate.cache.use_second_level_cache">true</prop>
<prop key="hibernate.cache.use_minimal_puts">true</prop>
<prop key="hibernate.cache.use_query_cache">true</prop>
....
</props>
</property>
</bean>
Can you explain, what I'm doing wrong?
Thanks in advance.
Regards,
jacquipre