javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'. 해결하기
general java 2018. 7. 30. 18:49javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'. 에러가 발생하면 라이브러를 추가한다.
2018-07-30T16:04:06,790 DEBUG o.s.b.f.s.DefaultListableBeanFactory.doCreateBean(539) - Eagerly caching bean 'mvcValidator' to allow for resolving potential circular references
2018-07-30T16:04:06,796 DEBUG o.s.b.f.s.DefaultListableBeanFactory.invokeInitMethods(1670) - Invoking afterPropertiesSet() on bean with name 'mvcValidator'
2018-07-30T16:04:06,797 DEBUG o.h.v.i.e.r.DefaultTraversableResolver.detectJPA(70) - Cannot find javax.persistence.Persistence on classpath. Assuming non JPA 2 environment. All properties will per default be traversable.
2018-07-30T16:04:06,798 DEBUG o.s.v.b.OptionalValidatorFactoryBean.afterPropertiesSet(43) - Failed to set up a Bean Validation provider
javax.validation.ValidationException: HV000183: Unable to initialize 'javax.el.ExpressionFactory'. Check that you have the EL dependencies on the classpath, or use ParameterMessageInterpolator instead
at org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.buildExpressionFactory(ResourceBundleMessageInterpolator.java:102)
at org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.<init>(ResourceBundleMessageInterpolator.java:45)
at org.hibernate.validator.internal.engine.ConfigurationImpl.getDefaultMessageInterpolator(ConfigurationImpl.java:423)
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:264)
Caused by: java.lang.NoSuchMethodError: javax.el.ExpressionFactory.newInstance()Ljavax/el/ExpressionFactory;
at org.hibernate.validator.messageinterpolation.ResourceBundleMessageInterpolator.buildExpressionFactory(ResourceBundleMessageInterpolator.java:98)
... 46 common frames omitted
spring boot에서는 아래와 같이 build.gradle 파일을 수정한다.
compile('javax.el:javax.el-api:3.0.0')
compile('org.glassfish:javax.el:3.0.0')
'general java' 카테고리의 다른 글
리눅스 장비에서 사용 중인 jenkins plugin 목록 뽑기 (0) | 2018.09.12 |
---|---|
spring logback json 출력 (0) | 2018.08.20 |
mvnw 설치하기 (0) | 2018.07.11 |
[zookeeper] zookeeper 추가 증설하기 (0) | 2018.06.25 |
[zookeeper] TTL 기능 추가된 3.6.0 (0) | 2018.06.25 |