Friday, 26 June 2015

Java Hibernate : hibernate-could-not-obtain-transaction-synchronized-session-for-current-thread

Some times with hibernate we got error while fetching data from database.

Error like :

hibernate-could-not-obtain-transaction-synchronized-session-for-current-thread

For this error one of the simple solution is :

Just user @Transactional annotation in your DAO implementation method from where you got error.

For Example :
        ...
        ...
        @Transactional
@Override
public List<Object> listObjectCategory(String objectName) {
...
....
}

Please put your valuable inputs and solutions to improving this post

No comments:

Post a Comment