Eclipse Maven项目报错2之A child container failed during start

时间:2022-09-24 22:21:07

问题:在同事那里拿了一个Eclipse的maven项目,导入报错,主要显示的是A child container failed during start

具体错误如下

六月 02, 2018 12:08:50 下午 org.apache.tomcat.util.digester.SetPropertiesRule begin
警告: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting property 'source' to 'org.eclipse.jst.jee.server:UcomWechat' did not find a matching property.
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server version: Apache Tomcat/9.0.0.M17
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server built: Jan 10 2017 20:59:20 UTC
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Server number: 9.0.0.0
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Name: Windows 10
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: OS Version: 10.0
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Architecture: amd64
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Java Home: D:\Program Files\Java\jdk1.8.0_121\jre
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Version: 1.8.0_121-b13
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: JVM Vendor: Oracle Corporation
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_BASE: D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: CATALINA_HOME: D:\Tomcat 9.0
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.base=D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dcatalina.home=D:\Tomcat 9.0
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dwtp.deploy=D:\workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp1\wtpwebapps
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Djava.endorsed.dirs=D:\Tomcat 9.0\endorsed
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.VersionLoggerListener log
信息: Command line argument: -Dfile.encoding=GBK
六月 02, 2018 12:08:50 下午 org.apache.catalina.core.AprLifecycleListener lifecycleEvent
信息: The APR based Apache Tomcat Native library which allows optimal performance in production environments was not found on the java.library.path: D:\Program Files\Java\jdk1.8.0_121\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\ProgramData\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;D:\Python\Python36\Scripts\;D:\Python\Python36\;%USERPROFILE%\AppData\Local\Microsoft\WindowsApps;;C:\Program Files (x86)\SSH Communications Security\SSH Secure Shell;.
六月 02, 2018 12:08:50 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["http-nio-80"]
六月 02, 2018 12:08:50 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
六月 02, 2018 12:08:50 下午 org.apache.coyote.AbstractProtocol init
信息: Initializing ProtocolHandler ["ajp-nio-8009"]
六月 02, 2018 12:08:50 下午 org.apache.tomcat.util.net.NioSelectorPool getSharedSelector
信息: Using a shared selector for servlet write/read
六月 02, 2018 12:08:50 下午 org.apache.catalina.startup.Catalina load
信息: Initialization processed in 998 ms
六月 02, 2018 12:08:50 下午 org.apache.catalina.core.StandardService startInternal
信息: Starting service Catalina
六月 02, 2018 12:08:50 下午 org.apache.catalina.core.StandardEngine startInternal
信息: Starting Servlet Engine: Apache Tomcat/9.0.0.M17
六月 02, 2018 12:08:51 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@6dbaceb9]
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@6dbaceb9]
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:441)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:139)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:173)
at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:708)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4832)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4964)
... 7 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:113)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
... 12 more
Caused by: java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
at java.util.zip.ZipFile.access$1400(ZipFile.java:60)
at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:717)
at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:419)
at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
at sun.misc.IOUtils.readFully(IOUtils.java:65)
at java.util.jar.JarFile.getBytes(JarFile.java:425)
at java.util.jar.JarFile.getManifestFromReference(JarFile.java:193)
at java.util.jar.JarFile.getManifest(JarFile.java:180)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:111)
... 13 more 六月 02, 2018 12:08:51 下午 org.apache.catalina.core.ContainerBase startInternal
严重: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: A child container failed during start
at java.util.concurrent.FutureTask.report(FutureTask.java:122)
at java.util.concurrent.FutureTask.get(FutureTask.java:192)
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:939)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:948)
at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:872)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745) 六月 02, 2018 12:08:51 下午 org.apache.catalina.startup.Catalina start
严重: The required Server component failed to start so Tomcat is unable to start.
org.apache.catalina.LifecycleException: A child container failed during start
at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:948)
at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardService.startInternal(StandardService.java:422)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:793)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.apache.catalina.startup.Catalina.start(Catalina.java:655)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:355)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:495) 六月 02, 2018 12:08:51 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["http-nio-80"]
六月 02, 2018 12:08:51 下午 org.apache.coyote.AbstractProtocol pause
信息: Pausing ProtocolHandler ["ajp-nio-8009"]
六月 02, 2018 12:08:51 下午 org.apache.catalina.core.StandardService stopInternal
信息: Stopping service Catalina
六月 02, 2018 12:08:51 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["http-nio-80"]
六月 02, 2018 12:08:51 下午 org.apache.coyote.AbstractProtocol destroy
信息: Destroying ProtocolHandler ["ajp-nio-8009"]

Eclipse报错如下图

Eclipse Maven项目报错2之A child container failed during start

这个错误几乎是致命的,好多同事都遇到了,那么解决的办法什么什么呢?很多人都是把Tomcat Server删除了然后重新ADD解决的,但是我这里连续操作了这个步骤不起作用,也有人说是以为maven包冲突或者是maven依赖没有添加导致的,于是我的解决办法如下

1:因为怀疑是maven仓库的问题,于是我重新下载了maven并且配置了环境变量,配置了path变量

http://mirror.bit.edu.cn/apache/maven/maven-3/3.5.3/binaries/apache-maven-3.5.3-bin.zip

Eclipse Maven项目报错2之A child container failed during start

Eclipse Maven项目报错2之A child container failed during start

在命令行测试maven,保证maven环境没问题

Eclipse Maven项目报错2之A child container failed during start

2:给Eclipse重新配置maven环境

首先,新建一个D:\maven\repository文件夹作为本地仓库,默认在C盘我的用户下面,这里新建一个目录方便查找

其次修改D:\apache-maven-3.5.3-bin\conf 我们从官网下的maven解压目录配置目录中的settings.xml,如下图

Eclipse Maven项目报错2之A child container failed during start

然后进入Eclipse进行设置,如下图我们输入新的maven配置文件地址,系统会自动识别到我们新的本地仓库位置,点击apply,点击OK

Eclipse Maven项目报错2之A child container failed during start

上一步配置OK后,我们右键项目-Maven-Update Project ,Force Update 是强制更新

Eclipse Maven项目报错2之A child container failed during start

这个时候工具会根据pom.xml从公网仓库下载所需jar到本地仓库,下载完成如下图所示

Eclipse Maven项目报错2之A child container failed during start

到这里配置完成,我们把项目clean一下,然后把server删除重新根据Tomcat9创建一个server,右键运行发现错误不再发生了

Eclipse Maven项目报错2之A child container failed during start的更多相关文章

  1. tomcat 启动报错 解决办法 A child container failed during

    控制台报错: Caused by: org.apache.catalina.LifecycleException: A child container failed during start at o ...

  2. tomcat 启动报错 解决办法 A child container failed during&nbsp

    转自:http://blog.sina.com.cn/s/blog_4e1e357d0102v55c.html 控制台报错: Caused by: org.apache.catalina.Lifecy ...

  3. Eclipse Maven项目报错3之找不到配置文件spring-servlet-context.xml

    一.具体错误如下图所示 根据文字提示可以看出是这个文件找不到,但是我去项目的这个目录找了,这个文件确实存在,那么是什么问题呢 二.解决问题 原因分析(来自网上) 代码编译的过程,是一个自动生成相应编译 ...

  4. Eclipse Maven项目报错1之JAVA编译版本报错

    一.错误Dynamic Web Module 3.0 requires Java 1.6 or newer 解决办法,在pom.xml文件中增加JAVA版本的属性配置,如下 <!-- add b ...

  5. eclipse启动项目报错:java&period;lang&period;ClassNotFoundException&colon; ContextLoaderListener

    eclipse 启动项目报错:找不到 Spring 监听器类 org.springframework.web.context.ContextLoaderListener 严重: Error confi ...

  6. STS新建的maven项目报错问题

    STS新建的maven项目报错问题 解决方法:打开pom.xml文件添加 <dependency> <groupId>javax.servlet</groupId> ...

  7. eclipse发布项目报错:Multiple Contexts hava a path of &OpenCurlyDoubleQuote;&sol;xxx&OpenCurlyDoubleQuote;

    你的位置:首页 > Java编程 > eclipse发布项目报错:Multiple Contexts hava a path of “/xxx“ eclipse发布项目报错:Multipl ...

  8. 【maven】ecplise新建maven项目 报错Could not calculate build plan&colon; Plugin org&period;apache&period;maven&period;plugins&colon;maven-resources-plugin

    在ecplise上新建maven项目 报错: Could not calculate build plan: Plugin org.apache.maven.plugins:maven-resourc ...

  9. shh和maven项目报错

    朋友整合ssh时突然报错, org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Cata ...

随机推荐

  1. leetcode-188 买卖股票4

    题目 给定一个数组表示股票每天的价格,最多交易k次,且手上最多只能拥有一支股票(即只能先卖出手上现有的股票再去购买新的股票),求最大的收益.     题目链接:买卖股票4     开始思路不清楚,参考 ...

  2. OceanBase RPC机制简要说明

    http://note.youdao.com/share/?id=d2163a7ba8ec1ec58e64683a961c5121&type=note RPC是OB一个比较重要的各个组件间进行 ...

  3. JqGrid 使用方法详解

    JQGrid JQGrid是一个在jquery基础上做的一个表格控件,以ajax的方式和服务器端通信. JQGrid Demo 是一个在线的演示项目.在这里,可以知道jqgrid可以做什么事情. 下面 ...

  4. Spring 3&period;x企业应用开发实战&lpar;14&rpar;----事务

    Spring虽然提供了灵活方便的事务管理功能,但这些功能都是基于底层数据库本身的事务处理机制工作的.要深入了解Spring的事务管理和配置,有必要先对数据库事务的基础知识进行学习. 何为数据库事务 “ ...

  5. Android开发(27)--TextView单击链接弹出Activity

    话不多说直接上码: 核心源码: package com.example.textview4; import android.app.Activity; import android.content.I ...

  6. vs2017打包安卓项目简述

    1.使用vs2017创建安卓项目 2.选择Release模式编译项目 3.项目存档 4.签名分发 存档完成后,点击分发按钮进入如下界面 按要求输入签名信息 选择apk保存位置 5.分享apk文件 参考 ...

  7. HDU-4763 Theme Section KMP

    题意:求最长的子串E,使母串满足EAEBE的形式,A.B可以任意,并且不能重叠. 题目链接:http://acm.split.hdu.edu.cn/showproblem.php?pid=4763 思 ...

  8. 《Tornado介绍》—— 读后总结

  9. Scala辅助构造器和主构造器

    和java或c++一样,scala也可以有任意多的构造器.不过,scala类有一个构造器比其它所有构造器都更为重要,它就是主构造器.除了主构造器之外,类还可以有任意多的辅助构造器. 有两点需要注意: ...

  10. 标签传播算法(Label Propagation)及Python实现

    众所周知,机器学习可以大体分为三大类:监督学习.非监督学习和半监督学习.监督学习可以认为是我们有非常多的labeled标注数据来train一个模型,期待这个模型能学习到数据的分布,以期对未来没有见到的 ...