webtier@glassfish.java.net

Re: [webtier] How to JSF 2.0 (Mojarra-2.0.2) with Facelets on Tomcat?

From: <webtier_at_javadesktop.org>
Date: Thu, 07 Jan 2010 14:01:21 PST

I have problem with new EL api confilicting with Jasper. In Tomcat 2.0.20 when I add EL JARs to WEB-INF\lib I get exception:
exception

javax.servlet.ServletException: java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:275)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

root cause

java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.getExpressionFactory()Ljavax/el/ExpressionFactory;" the class loader (instance of org/apache/jasper/servlet/JasperLoader) of the current class, org/apache/jsp/index_jsp, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ExpressionFactory used in the signature
        org.apache.jsp.index_jsp._jspInit(index_jsp.java:22)
        org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
        org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:159)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:329)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

It's conflict with el-api.jar in Tomcat lib directory. But without this Jasper and JSP doesn't work on server. Can You help with this?
[Message sent by forum member 'zacheusz' (zacheuszs_at_gmail.com)]

http://forums.java.net/jive/thread.jspa?messageID=379446