• 严重: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"] java.lang.NullPointer


    刚接触servlet类,按照课本的方法使用eclipse新建了一个servlet类。

    新建完成后,在web.xml里面进行注册

    这时候就会报错了。

    五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol pause
    信息: Pausing ProtocolHandler ["http-nio-8080"]
    五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol pause
    信息: Pausing ProtocolHandler ["ajp-nio-8009"]
    五月 07, 2016 11:23:28 上午 org.apache.catalina.core.StandardService stopInternal
    信息: Stopping service Catalina
    五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol destroy
    信息: Destroying ProtocolHandler ["http-nio-8080"]
    五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol destroy
    严重: Failed to destroy end point associated with ProtocolHandler ["http-nio-8080"]
    java.lang.NullPointerException
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:305)
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:481)
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:831)
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:533)
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

    五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol destroy
    信息: Destroying ProtocolHandler ["ajp-nio-8009"]
    五月 07, 2016 11:23:28 上午 org.apache.coyote.AbstractProtocol destroy
    严重: Failed to destroy end point associated with ProtocolHandler ["ajp-nio-8009"]
    java.lang.NullPointerException
    at org.apache.tomcat.util.net.NioEndpoint.releaseCaches(NioEndpoint.java:305)
    at org.apache.tomcat.util.net.NioEndpoint.unbind(NioEndpoint.java:481)
    at org.apache.tomcat.util.net.AbstractEndpoint.destroy(AbstractEndpoint.java:831)
    at org.apache.coyote.AbstractProtocol.destroy(AbstractProtocol.java:533)
    at org.apache.catalina.connector.Connector.destroyInternal(Connector.java:1023)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:589)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:877)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:633)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:351)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:485)

    后来我找到了原因。原来是我用了Tomcat8.0

    服务器使用注解的方式帮我注册了servlet了,这时候已经不需要我再web.xml手动注册了。

    我把web.xml配置的内容删了就可以了。

    -----蓝天白云,家里的猫,林里的鸟,愿一切安好。
  • 相关阅读:
    js 截取指定的字符串
    WebSocket实例 Vue中使用websoket
    Vue 水半球样式、圆形水进度条、在线编辑
    Elasticsearch学习笔记3 -- 文档操作
    Elasticsearch学习笔记2 -- 索引库的操作
    Elasticsearch学习笔记1 -- 安装elasticsearch
    Docker学习笔记5 -- Docker-compose
    Docker学习笔记4 -- Dockerfile
    Docker学习笔记3 -- 数据卷
    Docker学习笔记2 -- 常用命令
  • 原文地址:https://www.cnblogs.com/yuqinweb/p/5468025.html
Copyright © 2020-2023  润新知