画质王 2019-03-21 03:17 采纳率: 0%
浏览 7391

sprin boot 启动内嵌tomcat 报错。

[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条回答 默认 最新

  • L星火燎原 2019-03-21 08:24
    关注

    有个建议,你可以将你的报错在控制台截图下来,那样可能整齐一点,或者用一些格式工具调整一下,不然,这看的眼花缭乱,想帮你看的人估计看到这乱七八糟的样子也没啥心了、。、。。。。

    评论

报告相同问题?

悬赏问题

  • ¥88 实在没有想法,需要个思路
  • ¥15 MATLAB报错输入参数太多
  • ¥15 python中合并修改日期相同的CSV文件并按照修改日期的名字命名文件
  • ¥15 有赏,i卡绘世画不出
  • ¥15 如何用stata画出文献中常见的安慰剂检验图
  • ¥15 c语言链表结构体数据插入
  • ¥40 使用MATLAB解答线性代数问题
  • ¥15 COCOS的问题COCOS的问题
  • ¥15 FPGA-SRIO初始化失败
  • ¥15 MapReduce实现倒排索引失败