This week's book giveaway is in the Java 8 forum.
We're giving away four copies of Java 8 in Action and have Raoul-Gabriel Urma, Mario Fusco, and Alan Mycroft on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes hibernate3 & spring 1.2.4 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "hibernate3 & spring 1.2.4" Watch "hibernate3 & spring 1.2.4" New topic
Author

hibernate3 & spring 1.2.4

Doug Anderson
Greenhorn

Joined: Apr 23, 2004
Posts: 2
I am trying to move a spring based project from hibernate 2.x to hibernate3

I have swapped out the hibernate jar, changed the references in my xml from net.sf.hibernate to org.hibernate and am using

<bean id="sessionFactory" class="org.springframework.orm.hibernate3.LocalSessionFactoryBean">
.
.
.
</bean>

as my sessionFactory


I am getting the following

java.lang.NoClassDefFoundError: net/sf/hibernate/SessionFactory

which is a hibernate 2.x class.


Any suggestions on how to resolve this dependancy?


thanks in advance


doug anderson
Doug Anderson
Greenhorn

Joined: Apr 23, 2004
Posts: 2
Here are the libs in my class path

324153 Sep 1 11:12 cglib-nodep-2.1_2.jar
559366 Sep 1 11:15 commons-collections.jar
31605 Aug 30 12:25 commons-logging-1.0.3.jar
47531 Sep 1 11:13 ehcache-1.1.jar
1674454 Aug 30 12:26 hibernate3.jar
11630000 Aug 30 12:25 j2ee.jar*
121070 Aug 30 12:25 junit-3.8.1.jar
350677 Aug 30 12:25 log4j-1.2.7.jar
397032 Aug 30 12:25 mysql-connector-java-3.1.7-bin.jar
1847568 Aug 26 22:31 spring.jar
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: hibernate3 & spring 1.2.4
 
Similar Threads
Dirty Checking not occuring.
spring 2 with hibernate 3
How to define Hibernate SessionFactory with Spring applicationcontext.xml
LocalSessionFactoryBean is not a sessionfactory instance
Error: Hibernate operation: could not retrieve snapshot