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 Migrating from Spring 2.0 and Hibernate 3.0 to Spring 3.1 and Hibernate 4.1 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Migrating from Spring 2.0 and Hibernate 3.0 to Spring 3.1 and Hibernate 4.1" Watch "Migrating from Spring 2.0 and Hibernate 3.0 to Spring 3.1 and Hibernate 4.1" New topic
Author

Migrating from Spring 2.0 and Hibernate 3.0 to Spring 3.1 and Hibernate 4.1

Muhammad Abdul Arif
Greenhorn

Joined: Feb 04, 2012
Posts: 25
Hi All,

We are trying to migrate our application which has Spring 2.0 and Hibernate 3 to Spring 3.1 and Hibernate 4.1. I have copied all the required jar files for both Spring 3.1 and Hibernate 4.1. But when i start the server iam getting below exception



Below is the declaration of productUsersMgr in context file


Transaction Manager declaration


Session Factory declaration
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
http://forum.springsource.org/showthread.php?123976-Hibernate-4-migration might help.
Muhammad Abdul Arif
Greenhorn

Joined: Feb 04, 2012
Posts: 25
@Piyush Mangal

So that means hibernateTemplate cannot be used with hibernate4?
Piyush Mangal
Ranch Hand

Joined: Jan 22, 2007
Posts: 196
Yes that is what is being suggested by Spring Team. You can also find blog on spring source around the same.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17260
    
    6

Yes, since Hibernate 3.1 there is no gain or reason to use the HibernateTemplate. Hibernate removed the old boilerplate code that was needed, and is much cleaner. So no need to use the HibernateTemplate.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Muhammad Abdul Arif
Greenhorn

Joined: Feb 04, 2012
Posts: 25
Thanks mark and piyush.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Migrating from Spring 2.0 and Hibernate 3.0 to Spring 3.1 and Hibernate 4.1