Judging from the stacktrace you are deploying on a newer JBoss server which comes, by default, shipped with hibernate4 as such hibernate3 classes aren't going to work.
Either you have to include your own hibernate library into your war file to use hibernate3 (and you probably will have to fix several other classloading issues then). Or you switch to use Hibernate4.
When using hibernate4 there is no more HibernateTemplate
(as that should be considered deprecated since the release of hibernate 3.0.1 in 2006!). You might have to change some of your code if you rely heavily on the HibernateTemplate
.
For your configuration simply switch to the hibernate4 class.
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
<property name="dataSource" ref="erpUSDataSource" />
<property name="annotatedClasses">
<list>
<value>com.bean.OrderDetailsVO</value>
<value>com.bean.OrderVO</value>
</list>
</property>
<property name="hibernateProperties">
<props>
<prop key="hibernate.dialect">org.hibernate.dialect.SQLServer2008Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
<!-- <prop key="hibernate.hbm2ddl.auto">update</prop> -->
<!-- <prop key="hibernate.use_outer_join">false</prop>
<prop key="hibernate.cache.provider_class">net.sf.ehcache.hibernate.SingletonEhCacheProvider</prop>
<prop key="hibernate.hibernate.cache.use_query_cache">true</prop> -->
</props>
</property>
</bean>
The same goes for the used HibernateTransactionManager
which also needs to be switched to hibernate4, which is simply changing the package.
For more information on Spring and hibernate integration check the reference guide.
As mentioned there is no more HibernateTemplate
instead you should use the plain Hibernate API to implement repositories. More info here.
You should already have proper transactionmanagement setup but just in case check this section of the reference guide.