Confluence Will Not Start Due to NoSuchMethodError (getContextPath)


アトラシアン コミュニティをご利用ください。



Confluence does not start.

The following appears in catalina.out:

INFO: Starting Servlet Engine: Apache Tomcat/6.0.32
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(
        at java.lang.reflect.Method.invoke(
        at org.apache.catalina.startup.Bootstrap.start(
        at org.apache.catalina.startup.Bootstrap.main(
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
        at org.apache.catalina.core.StandardHost$MemoryLeakTrackingListener.lifecycleEvent(
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(
        at org.apache.catalina.core.StandardContext.start(
        at org.apache.catalina.core.ContainerBase.start(
        at org.apache.catalina.core.StandardHost.start(
        at org.apache.catalina.core.ContainerBase.start(
        at org.apache.catalina.core.StandardEngine.start(
        at org.apache.catalina.core.StandardService.start(
        at org.apache.catalina.core.StandardServer.start(
        at org.apache.catalina.startup.Catalina.start(
        ... 6 more


This error happens when there is something in the JVM's classpath that interferes with the Servlet engine, causing it to be incompatible with 2.5 or above. Tomcat's bootstrap JAR requires Servlet engine 2.5 or above, which contains the "getContextPath" method in javax.servlet.ServletContext.

Here are some possible reasons why this could happen:

  1. There is a JAR file in the classpath that is interfering with the servlet engine
  2. The web.xml is setting the servlet version below 2.5
  3. There is a JDK extension that is interfering with the servlet engine
  4. The JDK version is too old (Servlet 2.5 was introduced in JDK 1.5)


  • Determine which of the potential causes is the culprit and apply a fix. For example:
    • Remove the interfering JAR from the classpath
    • Modify web.xml to use the correct servlet version
    • Upgrade your JDK

(info) There may be other causes and resolutions to this issue besides what is listed here

Last modified on Mar 30, 2016


Powered by Confluence and Scroll Viewport.