LeanMoreTryMore
asked on
Hibernate problem - No CurrentSessionContext configured
An error, "No CurrentSessionContext configured", occured while executing the following method
Public static Session currentSession() {
try {
System.out.println("Hibern ateUtil.cu rrentSessi on() - start");
return getSessionFactory().getCur rentSessio n();
} catch (HibernateException ex) {
System.out.println("Hibern ateUtil.cu rrentSessi on() - failed due to " + ex);
throw ex;
}
}
I got the hibernate.cfg.xml file which resides in the Hibernate Home folder.
I have been trying for half an hour with no success.
Anyone who has any idea how to tackle this prblem, please advise.
Public static Session currentSession() {
try {
System.out.println("Hibern
return getSessionFactory().getCur
} catch (HibernateException ex) {
System.out.println("Hibern
throw ex;
}
}
I got the hibernate.cfg.xml file which resides in the Hibernate Home folder.
I have been trying for half an hour with no success.
Anyone who has any idea how to tackle this prblem, please advise.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
How are you starting the application up?