Search code examples
javatomcat8

No naming context bound to this class loader


I have created a Dynamic web project in Eclipse. When I try to run it on a local Tomcat from in Eclipse we are getting error:

No naming context bound to this class loader

I tried everything: running the application on another Tomcat version, another Eclipe version, ...

Can someone help me with this? This is currently a blocker for further developments because of no debug capabilities.

The full error log is:

WARNING: Failed to retrieve JNDI naming context for container [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/PCT_TO_CPQ]] so no cleanup was performed for that container
javax.naming.NamingException: No naming context bound to this class loader
    at org.apache.naming.ContextBindings.getClassLoader(ContextBindings.java:268)
    at org.apache.catalina.deploy.NamingResourcesImpl.cleanUp(NamingResourcesImpl.java:993)
    at org.apache.catalina.deploy.NamingResourcesImpl.stopInternal(NamingResourcesImpl.java:976)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
    at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5492)
    at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:226)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:264)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:856)
    at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1038)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.ContainerBase.removeChild(ContainerBase.java:856)
    at org.apache.catalina.core.ContainerBase.destroyInternal(ContainerBase.java:1038)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardService.destroyInternal(StandardService.java:585)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.core.StandardServer.destroyInternal(StandardServer.java:883)
    at org.apache.catalina.util.LifecycleBase.destroy(LifecycleBase.java:297)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:685)
    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:353)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:493)

Solution

  • 1.Try removing server and add it again.

    2.Clean the project.