Joined: Wed Mar 23, 2011 2:47 am Posts: 8
|
hi to all,
I am facing a problem to open a session with
Session sess = HibernateUtil.getSessionFactory().getCurrentSession();(by using HibernateUtil.getSessionFactory().opensession() i get but i need with getcurrentsession() )
it shows error like
Exception in thread "main" org.hibernate.SessionException: Session was already closed at org.hibernate.impl.SessionImpl.close(SessionImpl.java:302) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.hibernate.context.ThreadLocalSessionContext$TransactionProtectionWrapper.invoke(ThreadLocalSessionContext.java:342) at $Proxy0.close(Unknown Source) at com.srmri.model.studentmodel.setPatentScore(studentmodel.java:1453) at com.srmri.model.studentmodel.setResearchScore(studentmodel.java:1060) at com.srmri.model.studentmodel.main(studentmodel.java:118)
please help me if any body knows.
Thanks krishna
|
|