java.lang.LinkageError: loader constraint violation: when resolving interface method javax.servlet.jsp.JspApplicationContext.getExpressionFactory()-Collection of common programming errors
Your classpath is a mess.
This particular exception suggests that you’ve littered the webapp’s /WEB-INF/lib
folder with arbitrarily downloaded servletcontainer-specific libraries of a servletcontainer make/version which is incompatible with the servletcontainer where you’re actually deploying the webapp to. The particular exception message suggests that your /WEB-INF/lib
contains jsp-api.jar
, j2ee.jar
and/or javaee.jar
files.
You should remove them. The servletcontainer already ships with JSP. You should never copy/move servletcontainer-specific libraries around. It would only clash with the target runtime. If you did this to workaround compilation errors in your IDE, then you should have solved it differently. Namely, you should integrate the target servletcontainer in your IDE and then associate it with the project as Targeted Runtime. This way the IDE will automatically use the servletcontainer’s libraries in the compile time classpath.
See also:
- How do I import the javax.servlet API in my Eclipse project?