首先查看是否是端口冲突引起,在日志信息该错误位置往上找,如果再无错误信息,而只有该错误,则原因可能如下:

原因:

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

中文翻译如下:

解决方法:

package com.zang.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(0);
} 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中加入

    <servlet>
<servlet-name>loadServlet</servlet-name>
<servlet-class>com.zang.util.HouseKeeperServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>

项目启动时 Exception in thread "HouseKeeper" java.lang.NullPointerException的更多相关文章

  1. web 环境项目(intellj部署的tomcat) 重启时报 Exception in thread "HouseKeeper" java.lang.NullPointerException (转)

    Exception in thread "HouseKeeper" java.lang.NullPointerException at org.logicalcobwebs.pro ...

  2. GUI学习中错误Exception in thread "main" java.lang.NullPointerException

    运行时出现错误:Exception in thread "main" java.lang.NullPointerException 该问题多半是由于用到的某个对象只进行了声明,而没 ...

  3. java使用类数组 报错Exception in thread "main" java.lang.NullPointerException

    源代码如下: Point[] points=new Point[n];//Point是一个类 for(int i=0;i<n;i++) { System.out.print("请输入x ...

  4. Exception in thread "main" java.lang.NullPointerException

    1.在window操作系统上,使用eclipse开发工具从hdfs分布式文件系统上下载文件报空指针异常解决方法: log4j:WARN No appenders could be found for ...

  5. 给内部类对象数组属性赋值时报错:Exception in thread "main" java.lang.NullPointerException

    前言 1255: 打怪升级(Java),写这个题目程序的时候,控制台提示如下错误: Exception in thread "main" java.lang.NullPointer ...

  6. JAVA错误:Exception in thread "main" java.lang.NullPointerException

    JAVA错误:Exception in thread "main" java.lang.NullPointerException例如: Exception in thread &q ...

  7. xml出现Exception in thread "main" java.lang.NullPointerException

    运行代码出现Exception in thread "main" java.lang.NullPointerException 可以看下这个链接:https://ask.csdn. ...

  8. hive 启动不成功,报错:hive 启动报 Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/hadoop/mapred/MRVersi

    1. 现象:在任意位置输入 hive,准备启动 hive 时,报错: Exception in thread "main" java.lang.NoClassDefFoundErr ...

  9. windows上react-native run-android时Exception in thread "main" java.lang.IllegalArgumentException: MALFORMED报错

    报错如图 解决 在C:\Users\{用户名}\.gradle\wrapper\dists路径下,删除所有文件夹,重新run-android ps:网上搜了说是说是java解压缩编码格式问题什么的,感 ...

随机推荐

  1. VK Cup 2016 - Qualification Round 2 D. Three-dimensional Turtle Super Computer 暴力

    D. Three-dimensional Turtle Super Computer 题目连接: http://www.codeforces.com/contest/638/problem/D Des ...

  2. 《python学习手册》第35章 异常的设计

    嵌套异常处理器 其实我们主要需要搞清楚的问题应该是这样的,当异常发生的时候,无论是简单的异常处理还是复杂的异常处理,我们都应该能够清楚的了解到异常运行到哪里,被谁捕获了,现在控制权到了哪里了,下面我们 ...

  3. mysql中如何比较日期

    做项目,需求是要做一个统计的功能,首次进入默认显示今天以及七天前的数据,这个很好解决. 然后就是用户点击日历插件选择日志,根据日期来统计当天的情况,我数据库里存的时间是使用的时间戳 前台获取到的日期是 ...

  4. POJ 1286 Necklace of Beads(Polya简单应用)

    Necklace of Beads 大意:3种颜色的珠子,n个串在一起,旋转变换跟反转变换假设同样就算是同一种,问会有多少种不同的组合. 思路:正规学Polya的第一道题,在楠神的带领下,理解的还算挺 ...

  5. Constant-on-time buck-boost regulator converts a positive input to a negative output

    Buck regulators find wide application as step-down regulators for converting large positive input vo ...

  6. Open Source Universal 48 pin programmer design

    http://www.edaboard.com/thread227388.html Hi, i have designed a 48 pin universal programmer but need ...

  7. [js插件]分享一个文章内容信息提示插件Colortip

    引用 项目中需要一个信息提示的功能,就上网找了一个插件,发现colortip实现比较简单,就定了这个插件. 实现过程 官网:http://tutorialzine.com/2010/07/colort ...

  8. 使用 JMeter 完成常用的压力测试

    国内私募机构九鼎控股打造APP,来就送 20元现金领取地址:http://jdb.jiudingcapital.com/phone.html内部邀请码:C8E245J (不写邀请码,没有现金送)国内私 ...

  9. Ant简单工程的构建

    1.在Ant的官方网站http://ant.apache.org/bindownload.cgi下载Ant最新版本(我下载的是apache-ant-1.8.2-bin.zip),Ant无需安装,直接解 ...

  10. [翻译] TSActivityIndicatorView 自定义指示器

    TSActivityIndicatorView 自定义指示器 https://github.com/tomkowz/TSActivityIndicatorView TSActivityIndicato ...