spring-boot
spring-boot copied to clipboard
I try use undertow ,but it's error
i am try to use undertow container,but console error:
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl
at org.hibernate.validator.HibernateValidator.createGenericConfiguration(HibernateValidator.java:31)
at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:276)
at org.springframework.validation.beanvalidation.LocalValidatorFactoryBean.afterPropertiesSet(LocalValidatorFactoryBean.java:248)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor$LocalValidatorFactory.run(ConfigurationPropertiesBindingPostProcessor.java:453)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.getValidator(ConfigurationPropertiesBindingPostProcessor.java:387)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.determineValidator(ConfigurationPropertiesBindingPostProcessor.java:370)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:332)
at org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor.postProcessBeforeInitialization(ConfigurationPropertiesBindingPostProcessor.java:303)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:408)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1575)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
... 97 more`
build.gradle
dependencies {
providedRuntime(
'org.springframework.boot:spring-boot-starter-undertow:1.4.2.RELEASE'
)
testCompile(
'junit:junit:4.11',
"org.springframework.boot:spring-boot-starter-test:1.4.2.RELEASE",
'org.spockframework:spock-core:1.1-groovy-2.4-rc-1',
'org.spockframework:spock-spring:1.1-groovy-2.4-rc-1',
'org.openjdk.jmh:jmh-core:1.13',
'org.openjdk.jmh:jmh-generator-annprocess:1.13'
)
compile(
'org.springframework.boot:spring-boot-starter:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-web:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-validation:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-actuator:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-jdbc:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-log4j2:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-configuration-processor:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-data-mongodb:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-data-redis:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-mail:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-aop:1.4.2.RELEASE',
'org.springframework.boot:spring-boot-starter-data-rest:1.4.2.RELEASE',
'org.codehaus.groovy:groovy-all:2.4.7',
'cglib:cglib-nodep:3.2.4',
'org.objenesis:objenesis:2.4',
'com.lmax:disruptor:3.3.4',
//mybatis
'org.mybatis:mybatis:3.3.1',
'org.mybatis:mybatis-spring:1.2.4',
'com.github.pagehelper:pagehelper:4.1.3',
//mysql
'mysql:mysql-connector-java:5.1.38',
'com.alibaba:druid:1.0.18',
'com.google.guava:guava:19.0',
'commons-io:commons-io:2.4',
'org.apache.commons:commons-lang3:3.4',
'commons-codec:commons-codec:1.10',
'commons-fileupload:commons-fileupload:1.3.1',
'commons-beanutils:commons-beanutils:1.9.2',
'com.google.guava:guava:19.0',
'org.eclipse.collections:eclipse-collections:8.0.0-M1',
'org.eclipse.collections:eclipse-collections-testutils:8.0.0-M1',
'redis.clients:jedis:2.8.1',
//json
'com.fasterxml.jackson.core:jackson-databind:2.7.3',
'com.fasterxml.jackson.core:jackson-core:2.7.3',
'com.fasterxml.jackson.core:jackson-annotations:2.7.3',
'com.fasterxml.jackson.module:jackson-module-jaxb-annotations:2.7.3',
//pojo copy
'net.sf.dozer:dozer:5.5.1',
//image util
//metadata-extractor is a straightforward Java library for reading metadata from image files.
'com.drewnoakes:metadata-extractor:2.8.1',
//Thumbnailator is a thumbnail generation library for Java.
'net.coobird:thumbnailator:0.4.8',
//ant
'org.apache.ant:ant:1.9.6',
//servlet
'javax.servlet:javax.servlet-api:4.0.0-b01',
'javax.servlet.jsp:jsp-api:2.2.1-b03',
'com.mangofactory:swagger-springmvc:1.0.2',
'io.springfox:springfox-swagger2:2.5.0',
'com.sun.jersey:jersey-core:1.19.2',
'com.sun.jersey:jersey-client:1.19.2',
'com.sun.jersey.contribs:jersey-multipart:1.19.2'
)
}
application.properties
server.compression.min-response-size=1
server.compression.enabled=true
server.undertow.accesslog.enabled=true
server.undertow.accesslog.pattern=%t %a "%r" %s (%D ms)`
if i use tomcat container. it's ok
Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.