0
votes

I am installing on my home computer, Windows 7 Home Premium. Yesterday I completed the installation and started and stopped Tomcat several times, the console output looked fine, no errors.

Today when I start Tomcat (7.0.54) I get the following in its console:

Jun 26, 2014 1:47:02 PM org.apache.catalina.core.ContainerBase addChildInternal SEVERE: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/docs]] at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:632) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:744) Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getClassLoader()Ljava/lang/ClassLoader; at org.apache.catalina.startup.WebappServiceLoader.load(WebappServiceLoader.java:90) at org.apache.catalina.startup.ContextConfig.processServletContainerInitializers(ContextConfig.java:1546) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1268) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5355) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) ... 10 more

I have not yet attempted to put any apps beyond the Tomcat example apps into webapps. The contents of webapps is:

examples host-manager manager ROOT docs

If I remove all these directories, Tomcat runs without the error; even if I put docs back in, it has the error.

I've googled it, haven't found an answer yet. Can someone help me? It's got to be something fairly basic...

1

1 Answers

0
votes

I found part of the answer. After installation, I had added a jar file to the tomcat lib directory (%CATALINA_BASE%\lib\javaee-api-5.0-2.jar). When I remove this, the error goes away. Now I need to try to remember why I put it there, and whether I was supposed to, and that sort of thing. But I've seen a few other identical questions in other fora without answers, so I thought I would put up this much, anyway. If/when I get more, I'll follow up.