File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JSP and the fly likes When Running dynamic WebApplication This  Exception Showing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "When Running dynamic WebApplication This  Exception Showing" Watch "When Running dynamic WebApplication This  Exception Showing" New topic

When Running dynamic WebApplication This Exception Showing

Tushar Gaikwad

Joined: Jun 10, 2011
Posts: 3
SEVERE: Servlet.service() for servlet [jsp] in context with path [] threw exception [java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;] with root cause
java.lang.AbstractMethodError: javax.servlet.jsp.JspFactory.getJspApplicationContext(Ljavax/servlet/ServletContext;)Ljavax/servlet/jsp/JspApplicationContext;
at org.apache.jsp.index_jsp._jspInit(
at org.apache.jasper.runtime.HttpJspBase.init(
at org.apache.jasper.servlet.JspServletWrapper.getServlet(
at org.apache.jasper.servlet.JspServletWrapper.service(
at org.apache.jasper.servlet.JspServlet.serviceJspFile(
at org.apache.jasper.servlet.JspServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.valves.AccessLogValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$ Source)
at Source)
William Brogden
Author and all-around good cowpoke

Joined: Mar 22, 2000
Posts: 13037
According to the JavaDocs for java.lang.AbstractMethodError, this error must be due to incompatibility between the version of Java used to compile the class and the version executing the application.

(amazing what you can learn from the JavaDocs)
Stefan Evans

Joined: Jul 06, 2005
Posts: 1580
I believe you would also see this sort of error if you have multiple different versions of the servlet api in your classpath.

If your WEB-INF/lib directory contains jar files with javax.servlet.* classes, they shouldn't be there.
eg servlet-api.jar, jsp-api.jar

JspApplicationContext was introduced with JSP2.1 spec (Tomcat 6+), so if you have an older version of the API lying around, that would cause the problem.

I agree. Here's the link:
subject: When Running dynamic WebApplication This Exception Showing
It's not a secret anymore!