File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Spring and the fly likes Spring and Hibernate problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Spring and Hibernate problem" Watch "Spring and Hibernate problem" New topic
Author

Spring and Hibernate problem

Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362
Hi,

Am trying out a simple example using Spring3.1 and Hibernate 4.x and am getting this exception



My config files and java code is shown below












Can anybody help me where am wrong?

Thanks
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

Its a issue with Jar Files. Looks like you are having 2 versions of spring containing the SessionHolder class.
Can you post the list of jars from your WEB-INF/lib?


Regards, Prasad
SCJP 5 (93%)
Mary Cole
Ranch Hand

Joined: Dec 02, 2000
Posts: 362


This is how .classpath in my STS proj looks
Prasad Krishnegowda
Ranch Hand

Joined: Apr 25, 2010
Posts: 507

Jar Files looks OK. But, i can see in the XML you use hibernate4 classes like org.springframework.orm.hibernate4.HibernateTransactionManager and org.springframework.orm.hibernate4.LocalSessionFactoryBean, but you import hibernate3 classes in your Java code as org.springframework.orm.hibernate3.HibernateTemplate.

Can you make them consistent and try once?
 
jQuery in Action, 2nd edition
 
subject: Spring and Hibernate problem
 
Similar Threads
data not persisted using hibernate spring integration
Transactions in Spring + Hibernate
Sychronization problem with hibernate and weblogic 9.2 JTA
commit data in hibernate template through spring
HibernateDaoSupport and Transaction