Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Liutauras Vilda
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • fred rosenberger
  • salvin francis
Bartenders:
  • Piet Souris
  • Frits Walraven
  • Carey Brown

Spring and Hibernate problem

 
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
Mary Cole
Ranch Hand
Posts: 362
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is how .classpath in my STS proj looks
 
Prasad Krishnegowda
Ranch Hand
Posts: 672
4
Eclipse IDE Spring Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
The harder I work, the luckier I get. -Sam Goldwyn So tiny. - this ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic