`

Proxool报错Exception in Thread "HouseKeeper" java.lang.NullPointerException

    博客分类:
  • Java
阅读更多
问题:
当tomcat里的项目设置成reload=true时,Proxool报错Exception in Thread "HouseKeeper" java.lang.NullPointerException ;
原因:
This is because Proxool is not being shutdown properly. If the JVM stops then Proxool recognises that and shuts down gracefully, but if you redeploy Proxool into some environments (for example, a servlet container) then Proxool needs to be explicitly told so by calling ProxoolFacade.shutdown(). If you have a servlet container then you could put it in the servlet's destroy() method. Alternatively, use the ServletConfigurator to both configure and shutdown Proxool
解决办法:
在tomcat容器销毁时,将proxool连接池关闭。
在Servlet的destroy()方法中显式地proxool关闭连接池:
ProxoolFacade.shutdown();
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics