title: Hibernate sessionFactory or Hibernate Template missing
body: <p>I have this error everytime I change my <code>xml</code> file. Here's  what I got: </p>
  
  <p><code>org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'managerExpedBitacora' defined in class path resource [config/spring/manager.xml]: Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required</code></p>
  
  <p>Full stack:</p>
  
  <pre><code>at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1566)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
  at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
  at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
  at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
  at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
  at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:755)
  at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:757)
  at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:480)
  at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
  at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
  at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
  at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4728)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5166)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
  at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1399)
  at java.util.concurrent.FutureTask.run(FutureTask.java:262)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
  at java.lang.Thread.run(Thread.java:745)
  
  Caused by: java.lang.IllegalArgumentException: 'sessionFactory' or 'hibernateTemplate' is required
  at org.springframework.orm.hibernate4.support.HibernateDaoSupport.checkDaoConfig(HibernateDaoSupport.java:117)
  at org.springframework.dao.support.DaoSupport.afterPropertiesSet(DaoSupport.java:44)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1625)
  at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1562)
  ... 21 more
  </code></pre>
  
  <p>Here's my <code>manager.xml</code>, only refered lines:</p>
  
  <pre><code>&lt;bean id="managerExpedBitacora" class="es.myCompany.lq.manager.impl.ManagerExpedBitacoraImpl"&gt;
               &lt;property name="daoExpedBitacora" ref="daoExpedBitacora"/&gt;  
  &lt;/bean&gt;
  
  ...
  &lt;bean id="managerExpedienteLS" class="es.myCompany.lq.manager.impl.ManagerExpedienteLSImpl"&gt;
       ....
       &lt;property name="managerExpedBitacora" ref="managerExpedBitacora" /&gt;
       ....
  &lt;/bean&gt;
  </code></pre>
  
  <p>And here's my <code>daos.xml</code>, only some lines:</p>
  
  <pre><code>&lt;bean id="daoExpedBitacora" class="es.myCompany.lq.dao.impl.DaoExpedBitacoraHbmImpl"&gt;
       &lt;property name="sessionFactory" ref="sessionFactory"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>As u can see, I have injected the sessionFactory.</p>
  
  <p>And, <code>applicationContext.xml</code>, mail part:</p>
  
  <pre><code>&lt;import resource="classpath:config/spring/properties.xml"/&gt; 
  &lt;import resource="classpath:config/spring/utils.xml"/&gt;
  &lt;import resource="classpath:config/spring/bbdd.xml"/&gt;
  &lt;import resource="classpath:config/spring/daos.xml"/&gt;
  &lt;import resource="classpath:config/spring/manager.xml"/&gt;
  &lt;import resource="classpath:config/spring/actions.xml"/&gt;
  </code></pre>
  
  <p>And, part of my <code>DaoExpedBitacoraHbmImpl.java</code>:</p>
  
  <pre><code>public class DaoExpedBitacoraHbmImpl extends HibernateDaoSupport implements
      DaoExpedBitacora {
  ...(methods)
  }
  </code></pre>
  
  <p>And, <code>HibernateDaoSupport.java</code>, only part of it.</p>
  
  <pre><code>public class HibernateDaoSupport extends org.springframework.orm.hibernate4.support.HibernateDaoSupport{
  ....
  }
  </code></pre>
  
  <p>So, what is wrong here? </p>