信息: 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)
解决方案 »
- 用poi下载excel,在IE6下报服务器端错误,其他浏览器正常
- getJdbcTemplate().queryForList()的问题
- 出错了
- hql查询主键值最大的记录
- 请大家推荐一个性价比比较好的J2EE空间,能支持SSH,如果有免费的更好.....不过那是没可能啦。谢谢大家啦~~~~~~~~~~~
- eclipse3.2如何部署struts环境
- 麻烦请看下ubuntu下jboss的启动问题 谢谢~ 困扰我好几天了
- swfupload/extjs3,添加按钮没反应的问题
- 用struts框架开发,通过页面submit提交,如何控制打开窗口的外观属性?
- JAVA 怎么通过计算机串口通讯!
- 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