java - Facing issue in session with the upgrade of my application to Spring 4.1.9 and Hibernate 4.3.11 -
facing issue in session upgrade of application spring 4.1.9 , hibernate 4.3.11..logs below:
[org.springframework.orm.hibernate4.hibernatetemplate] - <could not retrieve pre-bound hibernate session> org.hibernate.hibernateexception: not obtain transaction-synchronized session current thread @ org.springframework.orm.hibernate4.springsessioncontext.currentsession(springsessioncontext.java:134) @ org.hibernate.internal.sessionfactoryimpl.getcurrentsession(sessionfactoryimpl.java:1014) @ org.springframework.orm.hibernate4.hibernatetemplate.doexecute(hibernatetemplate.java:325) @ org.springframework.orm.hibernate4.hibernatetemplate.executewithnativesession(hibernatetemplate.java:308) @ org.springframework.orm.hibernate4.hibernatetemplate.findbycriteria(hibernatetemplate.java:1011) @ org.springframework.orm.hibernate4.hibernatetemplate.findbycriteria(hibernatetemplate.java:1003)
there may below possible reason:
1) need put @repository on class of dao layer trying access session.
1) need put @transactional below @repository on class of dao layer trying access session.
3) container not able find bean definition file have declared session factory , transaction.
Comments
Post a Comment