This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Spring and the fly likes No SessionFactory specified(IllegalArgumentException) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "No SessionFactory specified(IllegalArgumentException)" Watch "No SessionFactory specified(IllegalArgumentException)" New topic
Author

No SessionFactory specified(IllegalArgumentException)

VenkataPrasad Regula
Ranch Hand

Joined: Jun 30, 2011
Posts: 63
I have a spring hibernate code. To my knowledge the code is correct. I am not able to identify where it is going wrong. In the DAO class I declared SessionFactory variable. It says
Caused by: java.lang.IllegalArgumentException: No SessionFactory specified
at org.springframework.util.Assert.notNull(Assert.jav a:112)
at org.springframework.orm.hibernate3.SessionFactoryU tils.doGetSession(SessionFactoryUtils.java:283)


EmployeeDaoImpl

application.xml

Client Code

Stack Trace
Tekchand Prasad
Ranch Hand

Joined: Oct 20, 2005
Posts: 32
This can be caused by a dirty classpath with different versions of Spring libraries all over the place.
Cleanup it and align it to the one and same Spring version with the correct versioned dependencies.
 
jQuery in Action, 2nd edition
 
subject: No SessionFactory specified(IllegalArgumentException)