root cause java.lang.LinkageError: loader constraint violation: loader (instanc

用Jstl开发,遇到问题:
root cause

java.lang.LinkageError: loader constraint violation: loader (instance of org/apache/jasper/servlet/JasperLoader) previously initiated loading for a different type with name "javax/el/ExpressionFactory"

解决:
在pom.xml文件中添加:
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
<version>2.2.4</version>
<scope>provided</scope>
</dependency>

因为在tomcat中的lib有,el-api,可能Sprint或Hibernate有el-api,这里重点是用了<scope>provided</scope>

你可能感兴趣的:(CONSTRAINT)