tomcat启动报错javax.naming.NamingException: No naming context bound to this class loader

tomcat启动报如下错误
javax.naming.NamingException: No naming context bound to this class loader
    at org.apache.naming.ContextBindings.getClassLoader(ContextBindings.java:350)
    at org.apache.catalina.deploy.NamingResources.cleanUp(NamingResources.java:985)
    at org.apache.catalina.deploy.NamingResources.stopInternal(NamingResources.java:968)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5743)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:232)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:272)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1040)
    at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1233)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:1040)
    at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1233)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:305)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:593)

 原因是因为我删除了eclipse中server的Runtime Enviroments 中的tomcat,又添加一个server

解决办法:项目右键->build path->libraries

tomcat启动报错javax.naming.NamingException: No naming context bound to this class loader

把之前的tomcat Remove掉

tomcat启动报错javax.naming.NamingException: No naming context bound to this class loader

点击Add Library 选中Server Runtime 把新添加的server 添加进来,在启动tomcat就行了!