Home  >  Forum  >  Hibernate
Post New Query

org.hibernate.SessionException: Session is closed



Asked on May 29, 2013
Hello Friends,

Got an error, any clue?

 org.hibernate.SessionException: Session is closed!
at org.hibernate.impl.AbstractSessionImpl.errorIfClosed(AbstractSessionImpl.java:72)
at org.hibernate.impl.SessionImpl.getTransaction(SessionImpl.java:1451)





Replied on May 29, 2013
It seems to me that you are calling any method of session after closing session like
session.close();
session.getTransaction().commit();

Above sequence will throw error, we need to do like

session.getTransaction().commit();
session.close();





Replied on June 18, 2013
yes, its right 

Write Answer








©2019 concretepage.com | Privacy Policy | Contact Us