I'm trying to set up my server properly so that I can run servlets on it with the help from Jenkins. Within the webapps folder are two war files. One for jenkins and one for the sample from apache. Both work fine but when trying to access localhost:8080 I get an HTTP 500 error.
I first discovered the error as I was trying to get a spring web app to deploy. All have so far failed although if I run the web app on my laptop it works fine so I'm assuming that the war file and the web app itself are fine.
Is there a possibility that the previous war files that I tried to deploy have caused a problem somewhere?
The laptop does not have jenkns installed - could jenkins be causing the problem?
I searched various posts and tried to find the jar file within other folders within the webapp directory but could find nothing. I then deleted all of the war files with the exception of jenkins. Jenkins loads but the main page does not.
Thanks for any help.
The full error message is:
HTTP Status 500 - java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
type Exception report
message java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
description The server encountered an internal error that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:549)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
root cause
java.lang.ClassCastException: org.apache.jasper.runtime.ELContextImpl cannot be cast to org.apache.jasper.el.ELContextImpl
org.apache.jasper.runtime.PageContextImpl.proprietaryEvaluate(PageContextImpl.java:1023)
org.apache.jsp.index_jsp._jspService(index_jsp.java:85)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
note The full stack trace of the root cause is available in the Apache Tomcat/7.0.42 logs.
When I received this message when trying to deploy the webapp (the one that works on laptop), the error line was where jstl was used but in this instance the webapp is no longer on the server and I'm just trying to access localhost.
The deployed app has probably included its own version of
jasper.jar
. Removejasper.jar
from the app's/WEB-INF/lib
directory. See https://stackoverflow.com/questions/12384779/org-apache-jasper-el-elcontextimpl-cannot-be-cast-to-org-apache-jasper-runtime-e for further details.