Springboot启动报错:child container failed during start

Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
引入了一个hsf pom文件后后,翻到异常堆栈最下面发现是:ServletContext没有getVirtualServerName方法,原因是pom冲突,解决方案:在hsf里面先排除就得servlet-api,在引入最新的:
A child container failed during start是结果,不是原因。

<!--引入新的-->
<dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <version>4.0.1</version>
</dependency>
<dependency>
            <groupId>com.taobao.hsf</groupId>
            <artifactId>hsf-all</artifactId>
            <version>2.2.5.0-SNAPSHOT</version>
            <exclusions>
            <!--排除旧的-->
            <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>servlet-api</artifactId>
            </exclusion>
            </exclusions>
 </dependency>

完整报错信息:
2018-12-02 20:45:22.747 ERROR 2307 --- [cat-startStop-1] org.apache.catalina.core.ContainerBase : A child container failed during start

java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at java.util.concurrent.FutureTask.report(FutureTask.java:122) [na:1.8.0_151]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) [na:1.8.0_151]
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409) [tomcat-embed-core-8.5.23.jar:8.5.23]
at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266) [na:1.8.0_151]
at java.util.concurrent.FutureTask.run(FutureTask.java) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [na:1.8.0_151]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [na:1.8.0_151]
at java.lang.Thread.run(Thread.java:748) [na:1.8.0_151]
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.23.jar:8.5.23]
... 7 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [Pipeline[StandardEngine[Tomcat].StandardHost[localhost].TomcatEmbeddedContext[]]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5117) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
... 7 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Failed to start component [org.apache.catalina.authenticator.NonLoginAuthenticator[]]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:167) [tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.core.StandardPipeline.startInternal(StandardPipeline.java:182) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
... 9 common frames omitted
Caused by: java.lang.NoSuchMethodError: javax.servlet.ServletContext.getVirtualServerName()Ljava/lang/String;
at org.apache.catalina.authenticator.AuthenticatorBase.startInternal(AuthenticatorBase.java:1141) ~[tomcat-embed-core-8.5.23.jar:8.5.23]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) [tomcat-embed-core-8.5.23.jar:8.5.23]
... 11 common frames omitted

原文地址:http://blog.51cto.com/thinklili/2325033

时间: 2024-10-11 14:42:25

Springboot启动报错:child container failed during start的相关文章

springboot启动报错退出,To display the conditions report re-run your application with &#39;debug&#39; enabled.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.2019-01-19 12:01:39.870 ERROR 8324 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : ***************************APPLICATIO

springboot启动报错:&quot;Error starting ApplicationContext. To display the conditions report re-run your application with &#39;debug&#39; enabled.&quot;

报错内容 java.lang.Object.wait(Native Method)java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:143)com.mysql.jdbc.AbandonedConnectionCleanupThread.run(AbandonedConnectionCleanupThread.java:41)2019-02-14 14:58:00.326 INFO 17688 --- [ main] Condition

Mysql启动报错解决方案:Failed to open log (file &#39;./mysql-bin.000901&#39;, errno 2)

ps -ef|grep mysql 发现里边没有mysql进程,于是进行重启. service mysqld start报错 查看错误日志 tail -100 /usr/local/mysql/var/iZ11yohng9aZ.err(主机名.err) 180223 15:31:51 mysqld_safe Starting mysqld daemon with databases from /usr/local/mysql/var 180223 15:31:51 InnoDB: The Inn

springboot启动报错start bean &#39;eurekaAutoServiceRegistration&#39; NullPointerException

解决方案参考:https://blog.csdn.net/hhj13978064496/article/details/82825365 我将eureka的依赖包放到了依赖包的最下面,启动报错, 如下: <dependencies> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId&

springboot启动报错:Failed to configure a DataSource

一.背景 springboot的出现,让项目搭建变得更方便快捷,同时简化掉很多的样板化配置代码,提高开发效率. 通过idea生成springboot项目,启动报错:Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. 通过错误不难看出是因为dataSource的url配置缺失导致,但是新生成的项目并没有使用到jdbc,为什

springboot启动报错:Cannot determine embedded database driver class for database type NONE.

1 package cn.zb.test; 2 3 import org.springframework.boot.SpringApplication; 4 5 import org.springframework.boot.autoconfigure.EnableAutoConfiguration; 6 7 import org.springframework.boot.autoconfigure.SpringBootApplication; 8 9 import org.springfram

scala终端启动报错:[ERROR] Failed to construct terminal; falling back to unsupported

MBP本机安装的是scala 2.11.12,通过命令行启动scala报错如下 报错之后,scala还是能启动 [@wooluwakerdeMBP:2.11.12]$ scala Welcome to Scala 2.11.12 (Java HotSpot(TM) 64-Bit Server VM, Java 1.8.0_231). Type in expressions for evaluation. Or try :help. [ERROR] Failed to construct term

Springboot启动报错:Failed to determine a suitable driver class

Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class 原因: 没有配置数据源,但springboot默认启用了数据源配置 解决办法: 启动类添加exclude参数,不启用DataSource 原

SpringBoot启动报错【This application has no explicit mapping for /error.....】

今天做SpringBoot小例子,在请求controller层的时候出现如下问题. Whitelabel Error Page This application has no explicit mapping for /error, so you are seeing this as a fallback. Wed Dec 14 16:35:25 CST 2016 There was an unexpected error (type=Not Found, status=404). No mes