jars shipped in war conflicting with jetty [duplic

2019-07-20 01:18发布

问题:

Possible Duplicate:
org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

I export a web service project (contains jsp pages) from Eclipse in a war file and deploy it in Jetty 8.1.5. It works fine on my machine. But after deploying the same war file on Jetty 8.1.3 on another machine (windows server 2003) it gives HTTP Error 500 and the following exception when I go to the index.jsp page:

org.apache.jasper.el.ELContextImpl cannot be cast to org.apache.jasper.runtime.ELContextImpl

the full trace and more details in this question which I posted two days ago. while all the jars that I have in WEB_INF/lib are provided in these two screenshots:

two days of looking around the internet for a solution resulted in knowing that the problem is caused by conflicts between the jars shipped in the war file and other jars (I guess the jetty jars).

The question is: how can I find out which jar is causing the problem? I tried browsing the contents of these jars looking for the class ElContextImpl but did not find anything ? Any thoughts?


EDIT:

I tried copying my local whole Jetty 8.1.5 into the server and statrted jetty from there.. but still no success.

回答1:

Your WAR file contains some unnecessary JARs like servlet-api-2.4.jar which should be part of the Jetty installation (maybe in another version).

At first sight you should remove all jetty-*.jar, servlet-api-2.4.jar, javax.servlet.*.jar. If you have taken these from your 8.1.5 Jetty installation then it could cause conflicts with your 8.1.3 installation.



标签: java jsp jar Jetty