java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; This method was added to the Servlet 2.5 APIs, which is what SJSAS 9.1 bundles. Do you by any chance have an earlier version of the Servlet APIs somewhere in your classpath? Jan

Oracle Community | harmeets | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Not able to start server, exception is coming

    Oracle Community | 8 years ago | harmeets
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String; This method was added to the Servlet 2.5 APIs, which is what SJSAS 9.1 bundles. Do you by any chance have an earlier version of the Servlet APIs somewhere in your classpath? Jan
  2. 0

    Admin console does not open

    Oracle Community | 10 years ago | 843833
    java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;

    Root Cause Analysis

    1. java.lang.NoSuchMethodError

      javax.servlet.ServletContext.getContextPath()Ljava/lang/String; This method was added to the Servlet 2.5 APIs, which is what SJSAS 9.1 bundles. Do you by any chance have an earlier version of the Servlet APIs somewhere in your classpath? Jan

      at org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage()
    2. Glassfish Core
      FormAuthenticator.authenticate
      1. org.apache.catalina.authenticator.FormAuthenticator.forwardToLoginPage(FormAuthenticator.java:423)
      2. org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:240)
      2 frames
    3. Security
      RealmAdapter.invokeAuthenticateDelegate
      1. com.sun.web.security.RealmAdapter.invokeAuthenticateDelegate(RealmAdapter.java:1146)
      1 frame
    4. Glassfish Core
      StandardPipeline.doInvoke
      1. org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:627)
      2. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:609)
      3. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      3 frames
    5. Glassfish
      WebPipeline.invoke
      1. com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94)
      1 frame
    6. Glassfish Core
      ContainerBase.invoke
      1. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:206)
      2. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      3. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      4. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      5. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      6. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
      7. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:632)
      8. org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
      9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:571)
      10. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
      10 frames
    7. org.apache.coyote
      CoyoteAdapter.service
      1. org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
      1 frame
    8. Glassfish Core
      WorkerThreadImpl.run
      1. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:637)
      2. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:568)
      3. com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:813)
      4. com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341)
      5. com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263)
      6. com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214)
      7. com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
      8. com.sun.enterprise.web.connector.grizzly.WorkerThreadImpl.run(WorkerThreadImpl.java:116)
      8 frames