im gettting the following error
org.hibernate.HibernateException: No Session found for current thread
at org.springframework.orm.hibernate4.SpringSessionCont
I solved the same problem with following 2 steps
Placed @Transactional on the service method as suggested
jordan002 in his answer on this page.
One more thing,If you have 2 configuration files: say
application-context.xml(For DB and Application Context Specific
configuration) and webmvc-context.xml(For web/controller specific
configuration), then you should scan the packages different for your
controllers and dao.
The webmvc-context.xml is loaded after application-context.xml.
I think the DAO class is loaded first with transactional references
when the application-context.xml is loaded, but it is replace with
another object, without transactional references, when
webmvc-context.xml is loaded.
Any way, I resolve the problem with specific packages scanned:
for application-context.xml
and
for webmvc-context.xml.