title: hibernate3.LocalDataSourceConnectionProvider cannot be cast to ConnectionProvider
body: <p>2.4release , hibernate 3.3.2ga . while creating sessionfactory. I'm getting following error. Please provide me a solution</p>
  
  <pre><code>&lt;bean id="sessionFactory"
          class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
              &lt;property name="dataSource" ref="erpUSDataSource" /&gt;
  
              &lt;property name="annotatedClasses"&gt;
                  &lt;list&gt;
                      &lt;value&gt;com.bean.OrderDetailsVO&lt;/value&gt;
                      &lt;value&gt;com.bean.OrderVO&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.SQLServer2008Dialect&lt;/prop&gt;
                      &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
                      &lt;!--  &lt;prop key="hibernate.hbm2ddl.auto"&gt;update&lt;/prop&gt; --&gt;
                      &lt;!-- &lt;prop key="hibernate.use_outer_join"&gt;false&lt;/prop&gt;
                      &lt;prop key="hibernate.cache.provider_class"&gt;net.sf.ehcache.hibernate.SingletonEhCacheProvider&lt;/prop&gt;
                      &lt;prop key="hibernate.hibernate.cache.use_query_cache"&gt;true&lt;/prop&gt; --&gt;
                  &lt;/props&gt;
              &lt;/property&gt;
       &lt;/bean&gt;
       &lt;bean id="hibernateTemplate" class="org.springframework.orm.hibernate3.HibernateTemplate"&gt;
          &lt;property name="sessionFactory" ref="sessionFactory"/&gt;
       &lt;/bean&gt;
  </code></pre>
  
  <p>Caused by: org.hibernate.HibernateException: Could not instantiate connection provider [org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider]
      at org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:192) [hibernate-core-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]
      at org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:114) [hibernate-core-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]
      at org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator.initiateService(ConnectionProviderInitiator.java:54) [hibernate-core-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]
      at org.hibernate.service.internal.StandardServiceRegistryImpl.initiateService(StandardServiceRegistryImpl.java:69) [hibernate-core-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]
      at org.hibernate.service.internal.AbstractServiceRegistryImpl.createService(AbstractServiceRegistryImpl.java:176) [hibernate-core-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]
      ... 90 more
  Caused by: java.lang.ClassCastException: org.springframework.orm.hibernate3.LocalDataSourceConnectionProvider cannot be cast to org.hibernate.service.jdbc.connections.spi.ConnectionProvider
      at org.hibernate.service.jdbc.connections.internal.ConnectionProviderInitiator.instantiateExplicitConnectionProvider(ConnectionProviderInitiator.java:189) [hibernate-core-4.2.0.Final-redhat-1.jar:4.2.0.Final-redhat-1]
      ... 94 more</p>