This problem bothers me now for days ..
I\'m trying to get the current session from my sessionFactor
but receive an org.hibernate.service.UnknownS
So, I don't know why it came up to me to comment out the line
((ConfigurableApplicationContext)applicationContext).close();
in init(ServletConfig config)
as such
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("/appServlet/servlet-context.xml");
this.restaurantOwnerRepository = (RestauranOwnerDAO)applicationContext.getBean("restaurantOwnerRepository");
//((ConfigurableApplicationContext)applicationContext).close();
}
but not closing the application context sure did help here..
I didn't thought about this. I just followed the warning in Eclipse
Resource leak: 'applicationContext' is never closed
and closed it without thinking obviously..