org.springframework.beans.factory.UnsatisfiedDependencyException: Unsatisfied dependency expressed through method 'anyMethodName' parameter 0:
<p>I don't know what's wrong with this setup...</p>

<p>AVERTISSEMENT: </p>

<pre><code>Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDao': Unsatisfied dependency expressed through method 'anyMethodName' parameter 0: Error creating bean with name 'sessionFactory' defined in class path resource [hbn-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [hbn-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
juil. 03, 2016 6:56:50 PM org.springframework.cache.ehcache.EhCacheManagerFactoryBean destroy
INFOS: Shutting down EhCache CacheManager
juil. 03, 2016 6:56:50 PM org.springframework.web.context.ContextLoader initWebApplicationContext
GRAVE: Context initialization failed
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDao': Unsatisfied dependency expressed through method 'anyMethodName' parameter 0: Error creating bean with name 'sessionFactory' defined in class path resource [hbn-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in class path resource [hbn-config.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.jboss.logging.Logger.debugf(Ljava/lang/String;I)V
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:651)
</code></pre>

<p>UserDao :</p>

<pre><code>@Repository
public class UserDao extends AbstractDao&lt;User&gt; {
private static Logger LOG = LoggerFactory.getLogger(UserDao.class);

public UserDao() {
}

public List&lt;User&gt; findAllUsers() {
    Query q = getHibernateTemplate()
            .getSessionFactory()
            .openSession()
            .createQuery("from " + entityClass.getSimpleName());

    List&lt;User&gt; list = q.list();

    return list;
}
</code></pre>

<p>AbstractDao :</p>

<pre><code>public abstract class AbstractDao&lt;E&gt; extends CustomHibernateDaoSupport {

protected final Class&lt;E&gt; entityClass;

@SuppressWarnings("unchecked")
public AbstractDao() {
    entityClass = (Class&lt;E&gt;) ((ParameterizedType) getClass().getGenericSuperclass()).getActualTypeArguments()[0];
}

protected HibernateTemplate getOneResultTemplate() {
    HibernateTemplate oneResultTemplate = createHibernateTemplate(getSessionFactory());
    oneResultTemplate.setMaxResults(1);
    return oneResultTemplate;
}

protected Query createQuery(String queryString) {
    return getSessionFactory().getCurrentSession().createQuery(queryString);
}

@Transactional(readOnly = false)
public void save(E entity) {
    getHibernateTemplate().save(entity);
}

@Transactional(readOnly = false)
public void saveOrUpdate(E entity) {
    getHibernateTemplate().saveOrUpdate(entity);
}

@Transactional(readOnly = false)
public void update(E entity) {
    getHibernateTemplate().update(entity);
}

@Transactional(readOnly = false)
public void delete(E entity) {
    getHibernateTemplate().delete(entity);
}

@SuppressWarnings("unchecked")
public List&lt;E&gt; list() {
    Query q = getHibernateTemplate().getSessionFactory().openSession()
            .createQuery("from " + entityClass.getSimpleName());
    return q.list();
}
</code></pre>

<p>CustomHibernateDaoSupport :</p>

<pre><code>public abstract class CustomHibernateDaoSupport extends HibernateDaoSupport {
   @Autowired
   public void anyMethodName(SessionFactory sessionFactory) {
      setSessionFactory(sessionFactory);
   }
}
</code></pre>

<p>webappContext : </p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;...

&lt;cache:annotation-driven /&gt;

&lt;context:property-placeholder location="classpath:app.properties" /&gt;

&lt;!-- Auto scan the components --&gt;
&lt;context:annotation-config /&gt;
&lt;context:component-scan base-package="com.example" /&gt;

&lt;bean id="applicationContextHolder"
    class="com.example.myproject.core.util.ApplicationContextHolder" /&gt;

&lt;import resource="classpath:hbn-config.xml" /&gt;
&lt;import resource="classpath:cache-config.xml" /&gt;
</code></pre>

<p></p>

<p>hbn-config :</p>

<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;...

    &lt;!-- Hibernate session factory --&gt;
    &lt;tx:annotation-driven /&gt;

    &lt;bean id="dataSource"
        class="org.springframework.jdbc.datasource.DriverManagerDataSource"&gt;
        &lt;property name="driverClassName" value="${jdbc.driverClassName}" /&gt;
        &lt;property name="url" value="${jdbc.url}" /&gt;
        &lt;property name="username" value="${jdbc.username}" /&gt;
        &lt;property name="password" value="${jdbc.password}" /&gt;
    &lt;/bean&gt;

    &lt;!-- Hibernate session factory --&gt;
    &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean"&gt;
        &lt;property name="dataSource"&gt;
            &lt;ref bean="dataSource" /&gt;
        &lt;/property&gt;
        &lt;property name="hibernateProperties"&gt;
            &lt;props&gt;
                &lt;prop key="hibernate.dialect"&gt;${hibernate.dialect}&lt;/prop&gt;
                &lt;prop key="hibernate.show_sql"&gt;${hibernate.show_sql}&lt;/prop&gt;
                &lt;prop key="hibernate.max_fetch_depth"&gt;${hibernate.max_fetch_depth}&lt;/prop&gt;
                &lt;prop key="hibernate.jdbc.fetch_size"&gt;${hibernate.jdbc.fetch_size}&lt;/prop&gt;
                &lt;prop key="hibernate.jdbc.batch_size"&gt;${hibernate.jdbc.batch_size}&lt;/prop&gt;
                &lt;prop key="hibernate.temp.use_jdbc_metadata_defaults"&gt;${hibernate.temp.use_jdbc_metadata_defaults}&lt;/prop&gt;
                &lt;prop key="hibernate.order_inserts"&gt;${hibernate.order_inserts}&lt;/prop&gt;
                &lt;prop key="hibernate.order_updates"&gt;${hibernate.order_updates}&lt;/prop&gt;
            &lt;/props&gt;
        &lt;/property&gt;
        &lt;property name="packagesToScan" value="com.example.myproject.core.model" /&gt;
    &lt;/bean&gt;

    &lt;bean id="transactionManager"
        class="org.springframework.orm.hibernate4.HibernateTransactionManager"&gt;
        &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
    &lt;/bean&gt;


    &lt;aop:config&gt;
        &lt;aop:pointcut id="serviceMethods"
            expression="execution(*com.example.myproject.core.dao.*Dao.*(..))" /&gt;
        &lt;aop:advisor advice-ref="txAdvice" pointcut-ref="serviceMethods" /&gt;
    &lt;/aop:config&gt;

    &lt;tx:advice id="txAdvice" transaction-manager="transactionManager"&gt;
        &lt;tx:attributes&gt;
            &lt;tx:method name="*" propagation="REQUIRED" read-only="false" /&gt;
            &lt;!-- &lt;tx:method name="save*" propagation="REQUIRED" read-only="false" 
                /&gt; --&gt;
            &lt;!-- &lt;tx:method name="add*" propagation="REQUIRED" read-only="false" /&gt; --&gt;
            &lt;!-- &lt;tx:method name="update*" propagation="REQUIRED" read-only="false" 
                /&gt; --&gt;
            &lt;!-- &lt;tx:method name="delete*" propagation="REQUIRED" read-only="false" 
                /&gt; --&gt;
            &lt;!-- &lt;tx:method name="export*" propagation="REQUIRED" read-only="false" 
                /&gt; --&gt;
            &lt;!-- &lt;tx:method name="import*" propagation="REQUIRED" read-only="false" 
                /&gt; --&gt;
        &lt;/tx:attributes&gt;
    &lt;/tx:advice&gt;

&lt;/beans&gt;
</code></pre>