Tomcat启动springboot项⽬war包报错:启动⼦级时出错的问题
今天公司springboot项⽬准备部署到测试服务器上进⾏测试,打包好war后放到tomcat⾥⾯启动后,前端⽂件能访问到,但是接⼝请求⼀直是404,⼀直了很久的原因,tomcat启动是成功的,war打包的时候也提⽰build success了,tomcat启动⽇志发现报错:
java.lang.IllegalStateException: 启动⼦级时出错
at org.ContainerBase.addChildInternal(ContainerBase.java:720)
at org.ContainerBase.addChild(ContainerBase.java:690)
at org.StandardHost.addChild(StandardHost.java:705)
at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:978)
at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1848)
at urrent.Executors$RunnableAdapter.call(Unknown Source)
at urrent.FutureTask.run(Unknown Source)
at at.util.ute(InlineExecutorService.java:75)
at urrent.AbstractExecutorService.submit(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:773)
at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1576)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:423)
at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:366)
at org.ContainerBase.startInternal(ContainerBase.java:936)
at org.StandardHost.startInternal(StandardHost.java:841)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.ContainerBase$StartChild.call(ContainerBase.java:1384)
at org.ContainerBase$StartChild.call(ContainerBase.java:1374)
at urrent.FutureTask.run(Unknown Source)
at at.util.ute(InlineExecutorService.java:75)
at urrent.AbstractExecutorService.submit(Unknown Source)
at org.ContainerBase.startInternal(ContainerBase.java:909)
at org.StandardEngine.startInternal(StandardEngine.java:262)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.StandardService.startInternal(StandardService.java:421)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.StandardServer.startInternal(StandardServer.java:930)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)下载apache
at org.apache.catalina.startup.Catalina.start(Catalina.java:738)
flect.NativeMethodAccessorImpl.invoke0(Native Method)
flect.NativeMethodAccessorImpl.invoke(Unknown Source)
flect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at flect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: org.apache.catalina.LifecycleException: 初始化组件[org.apache.catalina.webresources.JarResourceSet@67d48005]失败。
at org.apache.catalina.util.LifecycleBase.handleSubClassException(LifecycleBase.java:440)
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:726)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.sourcesStart(StandardContext.java:4792)
at org.StandardContext.startInternal(StandardContext.java:4928)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
at org.ContainerBase.addChildInternal(ContainerBase.java:717)
... 37 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: error in opening zip file
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:143)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:136)
... 44 more
Caused by: java.util.zip.ZipException: error in opening zip file
at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.zip.ZipFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at java.util.jar.JarFile.<init>(Unknown Source)
at at.utilpat.JreCompat.jarFileNewInstance(JreCompat.java:221)
at at.utilpat.JreCompat.jarFileNewInstance(JreCompat.java:206)
at org.apache.catalina.webresources.AbstractSingleArchiveResourceSet.initInternal(AbstractSingleArchiveResourceSet.java:140)
... 45 more
⼀直在关注:启动⼦级时出错,了很久没有解决!后⾯关注到下⾯的zip错误问题,然后再回去考虑打包的问题,终于发现打包的时候出现了问题,虽然最后是build success,但是前⾯提⽰了有error没注意到,截图如下:
这就是问题所在,怎么解决的呢?
解决⽅法:
将报错的jar包从maven仓库中删除掉,然后重新下载打包,发现这⼀次没有报错error,然后扔到tomcat⾥⾯启动没有错误⽇志了,访问也正常了!
谨以此⽂章记录提醒以后⾃⼰多关注⼀下项⽬执⾏、打包等过程和⽇志等!
总结
到此这篇关于Tomcat启动springboot项⽬war包报错:启动⼦级时出错的问题解决⽅案的⽂章就介绍到这了,更多相关Tomcat启动springboot项⽬war包报错内容请搜索以前的⽂章或继续浏览下⾯的相关⽂章希望⼤家以后多多⽀持!

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。