Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].StandardContext[/number_count]]
出现这个 bug 的原因的是依赖不是从同一仓库引入的,从而导致 servlet 冲突引起的;
解决办法:
<!-- https://mvnrepository.com/artifact/org.apache.hadoop/hadoop-client -->
<dependency>
<groupId>org.apache.hadoop</groupId>
<artifactId>hadoop-client</artifactId>
<version>2.6.0-cdh5.15.1</version>
<exclusions>
<exclusion>
<artifactId>servlet-api</artifactId>
<groupId>javax.servlet</groupId>
</exclusion>
</exclusions>
</dependency>
一般情况下,这样应该就解决问题了,如果还不能解决,就可能是添加了别的不需要的依赖,仅供参考
本文详细解析了Tomcat启动时出现的Failed to start component错误,该错误通常由依赖冲突引起,尤其是在不同仓库引入的servlet相关依赖。文章提供了解决方案,通过排除特定的servlet-api依赖来修复问题。

1279

被折叠的 条评论
为什么被折叠?



