title: LocalSessionFactoryBean does not return a SessionFactory instance
body: <p>I have the following standard configuration:</p>
  
  <pre><code>&lt;bean id="globalSessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean"&gt;
      &lt;property name="dataSource"&gt;
          &lt;ref bean="dataSource"&gt;&lt;/ref&gt;
      &lt;/property&gt;
      &lt;property name="mappingResources"&gt;
          &lt;list&gt;
              &lt;value&gt;...&lt;/value&gt;
          &lt;/list&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And in another module:</p>
  
  <pre><code>&lt;bean id="configurationSettingsService" class="com.HibernateConfigurationSettingsService"&gt;
      &lt;property name="sessionFactory" ref="globalSessionFactory"/&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Class using session factory:</p>
  
  <pre><code>public class HibernateConfigurationSettingsService implements ConfigurationSettingsService {
  
  private HibernateTemplate hibernateTemplate;
  private SessionFactory sessionFactory;
  
  public SessionFactory getSessionFactory() {
      return sessionFactory;
  }
  public void setSessionFactory(SessionFactory sessionFactory) {
      this.sessionFactory = sessionFactory;
      this.hibernateTemplate = new HibernateTemplate(sessionFactory);
  }
  </code></pre>
  
  <p>Only versions of libs on classpath are: </p>
  
  <p>hibernate 3.5.4-Final
  spring    3.2.3.RELEASE</p>
  
  <p>Trying to run the application in Tomee (using tomcat 7), get the following error:</p>
  
  <pre><code>Initialization of bean failed; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert property value of ty
  pe 'org.springframework.orm.hibernate3.LocalSessionFactoryBean' to required type 'org.hibernate.SessionFactory' for property 'sessionFactory'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.orm.hibernate3.LocalSessionFactoryBean] to required type [org.hibernate.S
  essionFactory] for property 'sessionFactory': no matching editors or conversion strategy found
  </code></pre>
  
  <p>Anyone have any idea why is Spring not retuning an instance of SessionFactory here?</p>
  
  <p>Thanks all.</p>
  
  <p>Resolved! Problem was with having spring libs on two classpaths, as soon as I set individual module dependencies to provided, everything was fine.</p>