Hi,
I encountered the problem of having the same .jar (for my case, el-api.jar v2.1)twice for one project, hence, the following error stack when I try to run my project using Tomcat 6.
WARNING: Unexpected error forwarding to login page 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/login_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
at java.lang.Thread.run(Thread.java:619) Caused by: 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/login_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
I have found the http://blog.springsource.com/2008/10/20/understanding-the-osgi-uses-directive/
but that is not useful as the solution effects too many parts of my project.
I can't make any changes to the Tomcat as well as the project will be used by many other user.
The current work around is to manuelly delete the el-api.jar every time we do a build AND uses Tomcat6. Then we need to put the .jar back as that is requested for other stuff.
I am used Maven 2 and Maven 3 to build. (btw, did anyone know about use Maven3 on Jruby?)
Can anyone help me with the issue?