Unable To Start Tomcat 7: NoSuchMethodError getSessionCookieConfig()
<p>I have used Tomcat about two months ago and it started OK. Now I'm getting this message:</p>

<pre><code>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:633)
    at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1120)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1678)
    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.getSessionCookieConfig()Ljavax/servlet/SessionCookieConfig;
    at org.apache.catalina.deploy.WebXml.configureContext(WebXml.java:1374)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1351)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:376)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5322)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    ... 10 more
</code></pre>

<p>Please note the following behavior:</p>

<ul>
<li><p>I get this error when I attempt to run catalina.bat. If I run Tomcat via Eclipse, it launches successfully</p></li>
<li><p>I downloaded the same version of Tomcat again and run it immediately without adding any webapps (to simply load the default Tomcat localhost page) but again I get this error.</p></li>
<li><p>As per previous similar questions, I replaced <code>servlet-api.jar</code> in apache's <code>lib</code> folder, but it has made no difference</p></li>
</ul>

<p>I was successfully able to launch <code>startup.bat</code> recently and I don't think anything has changed. Please advise, thanks.</p>