title: Problem with HibernateTemplate
body: <p>I am integrating Spring and Hibernate. My spring.xml is:
      
          
          
          
          
      </p>
  
  <pre><code>&lt;bean id="sessionFactory"
      class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="myDataSource" /&gt;
      &lt;property name="mappingResources"&gt;
          &lt;list&gt;
              &lt;value&gt;
                  resources/User.hbm.xml
                  &lt;!-- Project.hbm.xml ProjCF.hbm.xml Task.hbm.xml TaskCF.hbm.xml Category.hbm.xml 
                      TaskEstimation.hbm.xml ProjectEstimation.hbm.xml Parameter.hbm.xml StatisticTool.hbm.xml 
                      Report.hbm.xml --&gt;
              &lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.dialect"&gt; org.hibernate.dialect.HSQLDialect&lt;/prop&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.hbm2ddl.auto"&gt;create&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;bean id="myUserDAO" class="main.java.com.gwt.app.server.User"&gt;
      &lt;property name="sessionFactory" ref="sessionFactory" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And on my User class:</p>
  
  <pre><code>public void setSessionFactory(SessionFactory sessionFactory){
      this.hibernateTemplate = new HibernateTemplate(sessionFactory);
  }
  
  public User loadUser(String log){
      return (User)hibernateTemplate.load("User", log);
  }
  </code></pre>
  
  <p>The problem is that hibernateTemplate is null, could anyone help me????
  Thanks in advance!</p>