
Originally Posted by
ankitmishra
Hello Friends,
I was working on a basic spring+hibernate integration application.
Getting below error
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.springframework.web.util.NestedServletExceptio n: Request processing failed; nested exception is org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
org.springframework.web.servlet.FrameworkServlet.p rocessRequest(FrameworkServlet.java:894)
org.springframework.web.servlet.FrameworkServlet.d oPost(FrameworkServlet.java:789)
javax.servlet.http.HttpServlet.service(HttpServlet .java:637)
javax.servlet.http.HttpServlet.service(HttpServlet .java:717)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.ob tainContent(SiteMeshFilter.java:129)
com.opensymphony.sitemesh.webapp.SiteMeshFilter.do Filter(SiteMeshFilter.java:77)
root cause
org.hibernate.HibernateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
org.springframework.orm.hibernate3.AbstractSession FactoryBean$TransactionAwareInvocationHandler.invo ke(AbstractSessionFactoryBean.java:270)
$Proxy12.getCurrentSession(Unknown Source)
com.gloria.dao.impl.StudentDaoImpl.registerStudent (StudentDaoImpl.java:19)
com.gloria.service.impl.StudentServiceImpl.registe rStudent(StudentServiceImpl.java:20)
com.gloria.app.RegisterController.home(RegisterCon troller.java:41)
sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:592)
org.springframework.web.method.support.InvocableHa ndlerMethod.invoke(InvocableHandlerMethod.java:212 )
org.springframework.web.method.support.InvocableHa ndlerMethod.invokeForRequest(InvocableHandlerMetho d.java:126)