unable to initialize ‘javax.el.ExpressionFactory‘

build.gradle里面升级tomcat的版本

ext['tomcat.version'] = '9.0.58'

项目启动报错:

javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'.
 Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead

“javax.el.ExpressionFactory” 看着像el的错误。查了下,引用没有el的依赖。再查网上大部分说的都是缺少hibernate-validator依赖。 

hibernate-validator maven地址

比如:

compile('org.hibernate:hibernate-validator:5.1.1.Final')

添加对应的依赖,启动就正常了。

如果有el和hibernate-validator两个依赖,启动报错,该如何处理呢?参考文章《出现javax.validation.ValidationException: HV000183: Unable to initialize ‘javax.el.ExpressionFactory》

你可能感兴趣的:(错误处理,tomcat,java)