信息: Reloading this Context has started
Exception in thread "HouseKeeper" java.lang.NullPointerException
at org.logicalcobwebs.proxool.HouseKeeperController.getHouseKeeperToRun(HouseKeeperController.java:52)
at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java:33)
Exception in thread "HouseKeeper" java.lang.NullPointerException
at org.logicalcobwebs.proxool.HouseKeeperController.getHouseKeeperToRun(HouseKeeperController.java:52)
at org.logicalcobwebs.proxool.HouseKeeperThread.run(HouseKeeperThread.java:33)
解决方案 »
- 使用java连接oracle数据库出现的异常
- 加载spring3.0.3的jar包后报 java.lang.NoSuchMethodException: javax.servlet.ServletConte
- 视频网站,电影网站技术?
- [求助] java synchronized 的问题
- 解析html问题,麻烦各位大哥拉~~~
- windows下jsp移植到linux上奇怪问题?在线等
- EJB3 实体编写错误
- hibernate 影射文件编辑工具哪个好
- 有关ejb的stateful sessionbean的问题
- 关于wait和notify的问题
- java富客户端企业应用框架发布
- 用hibernate插入oracle数据库Date字段的问题
你的HouseKeeper线程的程序出错了,看看哪里在null的时候被强制使用了
后来我改用proxool-0.9.jar就不会报这个错了,可能是版本的不兼容吧~
Exception in thread "HouseKeeper" java.lang.NullPointerException2011-04-26 08:52虽然这个错误不影响项目,但是项目中的 class 类一改动 就无法自动启动起来了。因为这个错误导致的。很是麻烦!解决方法:(次方法也是来源于网络中,我只是再次分享。或者把零散的整合在一起说了)首先建立一个servlet类:package cn.ydc.framework.util;import java.io.IOException;import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.logicalcobwebs.proxool.ProxoolFacade;
/*
* 此类用来处理 在class类进行修改的时候 保存了之后服务自动重新启动 报:
* 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
*/
public class HouseKeeperServlet extends HttpServlet {
/**
*
*/
private static final long serialVersionUID = 4829418704873725291L; public void destroy() {
//此处添加处理
ProxoolFacade.shutdown();
} public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
} public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException { }}web.xml 中加入:<!-- for resolving HouseKeeper bug-->
<servlet>
<servlet-name>loadServlet</servlet-name>
<servlet-class>cn.ydc.framework.util.HouseKeeperServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
Caused by: org.hibernate.exception.GenericJDBCException: Cannot open connectionException in thread "HouseKeeper" java.lang.NullPointerException