Bonjour,

J'essaye de configurer Spring + hibernate dans une application Java;
Voici le fichier hibernate.cfg.xml (/WEB-INF/)
<hibernate-configuration>
<session-factory name="TestProject">
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">root</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost:3306/maBase</property>
<property name="hibernate.connection.username">root</property>
<property name="hibernate.default_schema">maBase</property>
<property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>

<mapping resource="fr/cs/tma/model/User.hbm.xml"/>
</session-factory>
Mon fichier de confi web.xml est comme suit :
<display-name>TestProject</display-name>
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
/WEB-INF/applicationContext.xml
</param-value>
</context-param>
<listener>
<listener-class>
org.springframework.web.context.ContextLoaderListener
</listener-class>
</listener>

<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>
org.springframework.web.filter.DelegatingFilterProxy
</filter-class>
</filter>

<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
Et enfin mon fichier de config spring
<!-- Session hibernate -->
<bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
<property name="jndiName">
<value>java:comp/env/jdbc/tmd</value>
</property>
</bean>

<bean id="sessionFactory"
class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">

<property name="dataSource">
<ref bean="dataSource"/>
</property>
<property name="hibernateProperties">
<value>
hibernate.dialect=org.hibernate.dialect.MySQLDialect
hibernate.show_sql=false
hibernate.transaction.factory_class=org.hibernate.transaction.JDBCTransactionFactory
hibernate.query.factory_class=org.hibernate.hql.classic.ClassicQueryTranslatorFactory
hibernate.cache.provider_class=org.hibernate.cache.EhCacheProvider
</value>
</property>
<property name="mappingResources">
<list>
<value>/fr/cs/tma/model/User.hbm.xml</value>
</list>
</property>
</bean>

<bean id="transactionManager"
class="org.springframework.orm.hibernate3.HibernateTransactionManager">
<property name="sessionFactory">
<ref local="sessionFactory"/>
</property>
</bean>

<bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"/>

<bean class="org.springframework.transaction.interceptor.TransactionAttributeSourceAdvisor">
<property name="transactionInterceptor" ref="transactionInterceptor"/>
</bean>

<bean id="transactionInterceptor"
class="org.springframework.transaction.interceptor.TransactionInterceptor">
<property name="transactionManager" ref="transactionManager"/>
<property name="transactionAttributeSource">
<bean class="org.springframework.transaction.annotation.AnnotationTransactionAttributeSource"/>
</property>
</bean>


<!-- Un bean abstrait pour mtualiser la configuration -->
<bean id="baseDAO"
class="org.springframework.orm.hibernate3.support.HibernateDaoSupport"
abstract="true">

<!-- Injection de la fabrique de sessions hibernate -->
<property name="sessionFactory">
<ref bean="sessionFactory"/>
</property>

</bean>

<!-- Le DAO pour les users -->
<bean id="userDao"
class="fr.cs.tma.dao.hibernate.UserDaoHibernate"
scope="singleton"
lazy-init="true"
abstract="false"
parent="baseDAO">

</bean>
A la compilation, j'ai l'erreur suivante :
BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is org.hibernate.HibernateException: could not instantiate RegionFactory [org.hibernate.cache.impl.bridge.RegionFactoryCacheProviderBridge]

Dans mon dossier "lib", j'ai bien mes fichiers jar pour spring et hibernate.

Mon environnement de travail :
Hibernate 3
Spring 3.0.5
MacOS

Pourriez-vous m'aider ou m'éclaircir sur cette erreur ? MERCI