当开发JBPM的相关应用时,会出现如下异常:
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)
仔细观察上边异常提示,不难发现是由于解析jsp文件的类有两个,java不知道使用哪个解析jsp文件造成的
原因是项目中WEB-INF\lib中的三个jar包(juel.jar, juel-engine.jar, juel-impl.jar)和
tomcat6下lib中jar包(el-api.jar)冲突
解决方法:方法一:换成tomcat5.5 一点问题也没有了方法二:将juel.jar, juel-engine.jar, juel-impl.jar这三个包复制到tomcat6下lib中,
并删除tomcat6下原来的el-api.jar,切记要把WEB-INF\lib中的juel.jar, juel-engine.jar, juel-impl.jar删除。
不然还是要冲突。
当删除掉el-api.jar的时候如果出现的错误如下:(我在myeclipse7.5+tomcat1.6.18中没删除el-api.jar,只是删了项目中的3个包并把他们拷贝到tomcat/lib下也没报错)
java.lang.NoClassDefFoundError: javax / el / ExpressionFactory解决jbpm4.3当中el-api.jar和三个包冲突的过程中,删除el-api.jar是出现的错误,把名为javaee.jar包(在myeclipse下有这个包)放到tomcat/lib里面就可以了