u011638191
画质王
2019-03-21 03:17

sprin boot 启动内嵌tomcat 报错。

  • spring
  • java
  • tomcat
  • maven
  • jar

[ost-startStop-1] o.s.b.web.embedded.tomcat.TomcatStarter : Error starting Tomcat context. Exception: org.springframework.beans.factory.UnsatisfiedDependencyException. Message: Error creating bean with name 'webMetricsFilter' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/web/servlet/WebMvcMetricsConfiguration.class]: Unsatisfied dependency expressed through method 'webMetricsFilter' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mvcHandlerMappingIntrospector' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping]: Factory method 'requestMappingHandlerMapping' threw exception; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'logHandlerInterceptor': Unsatisfied dependency expressed through field 'dubboService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dubboService' defined in URL [jar:file:/data/sjdata_tlsy/jars/backend-api/backend-api-1.0.1.jar!/BOOT-INF/classes!/com/shengjie/backend/util/DubboService.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: dubboService; nested exception is java.lang.IllegalStateException: Failed to check the status of the service com.shengjie.dubbo.agents.IAgentsService. No provider available for the service com.shengjie.dubbo.agents.IAgentsService:1.0.0 from the url zookeeper://127.0.0.1:2181/com.alibaba.dubbo.registry.RegistryService?application=backend-api&dubbo=2.6.0&interface=com.shengjie.dubbo.agents.IAgentsService&methods=findByAgent,findByGameId&pid=3423&register.ip=172.16.0.14&revision=1.0.1&side=consumer&timestamp=1553109052423&version=1.0.0 to the consumer 172.16.0.14 use dubbo version 2.6.0
2019-03-21 03:10:52.828 WARN 3423 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
2019-03-21 03:10:52.844 INFO 3423 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-03-21 03:10:52.853 ERROR 3423 --- [ main] o.s.boot.SpringApplication : Application startup failed

org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:153) ~[spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543) ~[spring-context-5.0.2.RELEASE.jar!/:5.0.2.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:138) ~[spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:751) [spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:387) [spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245) [spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233) [spring-boot-2.0.0.M7.jar!/:2.0.0.M7]
at com.shengjie.backend.BackendApiApplication.main(BackendApiApplication.java:22) [classes!/:1.0.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_111]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_111]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_111]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_111]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [backend-api-1.0.1.jar:1.0.1]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [backend-api-1.0.1.jar:1.0.1]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [backend-api-1.0.1.jar:1.0.1]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [backend-api-1.0.1.jar:1.0.1]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat

  • 点赞
  • 回答
  • 收藏
  • 复制链接分享

3条回答