2016-12-06 3 views
2

봄에 시동을 걸기 시작합니다. 이 errer 메시지봄 부팅시 사용을 시도했지만 오류가 발생했습니다.

10:17:49.123 [main] ERROR org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroy method on bean with name 'org.springframework.context.annotation.internalScheduledAnnotationProcessor' threw an exception 
10:17:49.128 [main] ERROR org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception 
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot[email protected]71ba6d4e: startup date [Tue Dec 06 10:17:46 CST 2016]; root of context hierarchy 
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) [spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:554) [spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:954) [spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:523) [spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingletons(DefaultListableBeanFactory.java:961) [spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1033) [spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:555) [spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:761) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:371) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1186) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1175) [spring-boot-1.4.2.RELEASE.jar:1.4.2.RELEASE] 
    at com.test.Application.main(Application.java:34) [main/:?] 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_92] 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_92] 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_92] 
    at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_92] 
    at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) [idea_rt.jar:?] 
10:17:49.128 [main] ERROR org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroy method on bean with name 'org.springframework.boot.context.properties.ConfigurationPropertiesBindingPostProcessor' threw an exception 
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot[email protected]71ba6d4e: startup date [Tue Dec 06 10:17:46 CST 2016]; root of context hierarchy 
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:253) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:578) [spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
10:17:49.129 [main] ERROR org.springframework.beans.factory.support.DefaultListableBeanFactory - Destroy method on bean with name 'org.springframework.boot.autoconfigure.internalCachingMetadataReaderFactory' threw an exception 
java.lang.IllegalStateException: ApplicationEventMulticaster not initialized - call 'refresh' before multicasting events via the context: org.springframework.boot[email protected]71ba6d4e: startup date [Tue Dec 06 10:17:46 CST 2016]; root of context hierarchy 
    at org.springframework.context.support.AbstractApplicationContext.getApplicationEventMulticaster(AbstractApplicationContext.java:404) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.context.support.ApplicationListenerDetector.postProcessBeforeDestruction(ApplicationListenerDetector.java:97) ~[spring-context-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
10:17:49.133 [main] ERROR org.springframework.boot.SpringApplication - Application startup failed 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'embeddedServletContainerCustomizerBeanPostProcessor': BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cachingConfig' defined in file [D:\workspace\test\build\classes\main\com\test\config\CachingConfig.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:478) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.springframework.cache.annotation.ProxyCachingConfiguration': Unsatisfied dependency expressed through method 'setConfigurers' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cachingConfig' defined in file [D:\workspace\test\build\classes\main\com\test\config\CachingConfig.class]: Initialization of bean failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class org.hibernate.validator.internal.engine.ConfigurationImpl 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredMethodElement.inject(AutowiredAnnotationBeanPostProcessor.java:671) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:370) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1219) ~[spring-beans-4.3.4.RELEASE.jar:4.3.4.RELEASE] 

build.gradle

configurations { 
    compile.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-logging' 
    compile.exclude group: 'org.springframework.boot', module: 'spring-boot-starter-tomcat' 
} 

task wrapper(type: Wrapper) { 
    gradleVersion = '3.1' 
} 

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-jersey: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.springframework.boot:spring-boot-starter-freemarker: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', 
      //java工具类 
      'com.google.guava:guava:19.0', 

      // apache的commons工具类 
      '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', 
      //java guava工具类 
      'com.google.guava:guava:19.0', 
      //java collections 工具类 
      'org.eclipse.collections:eclipse-collections:8.0.0-M1', 
      'org.eclipse.collections:eclipse-collections-testutils:8.0.0-M1', 
      //操作redis 
      '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', 
      //二维码 
      'com.google.zxing:core:3.2.1', 
      'com.google.zxing:javase:3.2.1', 
      //shiro 
      'org.apache.shiro:shiro-core:1.2.4', 
      'org.apache.shiro:shiro-web:1.2.4', 
      'org.apache.shiro:shiro-ehcache:1.2.4', 
      'org.apache.shiro:shiro-spring:1.2.4', 
      'org.apache.shiro:shiro-cas:1.2.4', 
      //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', 
      //管理项目中API接口 
      'com.mangofactory:swagger-springmvc:1.0.2', 
      'io.springfox:springfox-swagger2:2.5.0', 
      //http 请求工具 
      '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' 
    ) 
} 

하지만 내 프로젝트 incloud 유효성 검사기 항아리입니다. 이 코드를 추가 할 경우

// @Bean 
// public UndertowEmbeddedServletContainerFactory embeddedServletContainerFactory() { 
// UndertowEmbeddedServletContainerFactory factory = new UndertowEmbeddedServletContainerFactory(); 
// factory.addBuilderCustomizers(builder -> builder.addHttpListener(80, "0.0.0.0") 
//  .setServerOption(UndertowOptions.ENABLE_HTTP2, true)); 
// return factory; 

오류 : java.lang.ClassNotFoundException가 : 내가 tocmat 또는 부두를 사용하는 경우 io.undertow.Undertow $ 빌더

, 그것은 내가이있어 잘 모르겠어요 확인 입니다 봄 부팅 또는 언더 토 문제.

이 내가 그 오류 해결 한 this's my lib list

+0

스프링 부트 플러그인을 사용하고 있습니까? 당신이'hibernate-validator' 의존성을 빠뜨린 것처럼 보이고 포함 된 종속성들로 판단 할 때 시동기 놈들로부터 제공되는 의존성을 사용하지 않기 위해 매우 열심히 노력하십시오. –

+0

종속성이'hibernate-validator' 의존성을 포함하고 있다고 확신합니다 –

+0

stacktrace ...에 따르지 않습니다. java.lang.NoClassDefFoundError : 클래스를 초기화 할 수 없습니다. org.hibernate.validator.internal.engine.ConfigurationImpl'은 꽤 많이 보입니다. 그렇지 않습니다. –

답변

0

내 lib 디렉토리 목록입니다 : java.lang.NoClassDefFoundError가 :

을에 의한 클래스 org.hibernate.validator.internal.engine.ConfigurationImpl을 초기화 할 수 없습니다

<dependency> 
     <groupId>org.jboss.logging</groupId> 
     <artifactId>jboss-logging</artifactId> 
     <version>3.2.0.Final</version> 
    </dependency> 
012 :

이 누락 의존성을 추가