When upgrading our Spring 4.3 to 5 using Spring boot initializer on tomcat 8.5, we started getting exceptions:
2021-06-06 12:37:50,482 DEBUG [background-preinit] messageinterpolation.ResourceBundleMessageInterpolator (ResourceBundleMessageInterpolator.java:220) - Failed to load expression factory via classloader ParallelWebappClassLoader
context: ROOT
delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@76f856a8
javax.el.ELException: Unable to find ExpressionFactory of type [# Licensed to the Apache Software Foundation (ASF) under one or more]
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:154) ~[el-api.jar:3.0.FR]
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:93) ~[el-api.jar:3.0.FR]
at org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.canLoadExpressionFactory(ResourceBundleMessageInterpolator.java:216) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.buildExpressionFactory(ResourceBundleMessageInterpolator.java:170) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.<init>(ResourceBundleMessageInterpolator.java:94) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.internal.engine.AbstractConfigurationImpl.getDefaultMessageInterpolator(AbstractConfigurationImpl.java:573) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.internal.engine.AbstractConfigurationImpl.getDefaultMessageInterpolatorConfiguredWithClassLoader(AbstractConfigurationImpl.java:822) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.internal.engine.AbstractConfigurationImpl.getMessageInterpolator(AbstractConfigurationImpl.java:483) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.internal.engine.ValidatorFactoryImpl.<init>(ValidatorFactoryImpl.java:153) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.HibernateValidator.buildValidatorFactory(HibernateValidator.java:38) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.hibernate.validator.internal.engine.AbstractConfigurationImpl.buildValidatorFactory(AbstractConfigurationImpl.java:451) [hibernate-validator-6.2.0.Final.jar:6.2.0.Final]
at org.springframework.boot.autoconfigure.BackgroundPreinitializer$ValidationInitializer.run(BackgroundPreinitializer.java:149) [spring-boot-autoconfigure-2.5.0.jar:2.5.0]
at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.runSafely(BackgroundPreinitializer.java:111) [spring-boot-autoconfigure-2.5.0.jar:2.5.0]
at org.springframework.boot.autoconfigure.BackgroundPreinitializer$1.run(BackgroundPreinitializer.java:102) [spring-boot-autoconfigure-2.5.0.jar:2.5.0]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_151]
Caused by: java.lang.ClassNotFoundException: # Licensed to the Apache Software Foundation (ASF) under one or more
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1358) ~[catalina.jar:8.5.50]
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1180) ~[catalina.jar:8.5.50]
at javax.el.ExpressionFactory.newInstance(ExpressionFactory.java:147) ~[el-api.jar:3.0.FR]
... 14 more
el-api jar is taken from tomcat/lib and we also changed el-api version from 2 to 3 which still throwing the exception
Is there a known solution to this exceptions?
Can it be ignored?
I found related bug that it won't be fixed
EPEL el6 changed to end-of-life (EOL) status on 2020-11-30. EPEL el6 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…