标签:控制 resources component web lazy localhost odi 网上 span
Caused by: org.apache.catalina.LifecycleException: A child container failed during start at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:953
遇到这个问题的有很多种情况
<!-- 监听加载Spring --> <context-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:applicationContext*.xml</param-value> </context-param> <listener> <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class> </listener> <!-- 编码过滤器 --> <filter> <filter-name>Encoding</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> <!-- <async-supported>true</async-supported> --> <init-param> <param-name>encoding</param-name> <param-value>utf-8</param-value> </init-param> </filter> <filter-mapping> <filter-name>Encoding</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <!-- 配置spring mvc前端控制器 --> <servlet> <servlet-name>springwebmvc</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <!-- 通过此参数的配置加载spring配置文件,然后初始化资源 --> <param-name>contextConfigLocation</param-name> <param-value>classpath:spring-*.xml</param-value> <!-- <param-value>classpath:spring-*.xml</param-value> --> </init-param> <!--让tomcat启动则加载此servlet对象,数值越小优先级越高 --> <load-on-startup>1</load-on-startup> </servlet> <!-- 配置Spring MVC前端控制器映射(servlet映射) --> <servlet-mapping> <servlet-name>springwebmvc</servlet-name> <url-pattern>/</url-pattern><!-- 除jsp拦截所有 --> </servlet-mapping> <!-- <welcome-file-list> <welcome-file>admin/index.jsp</welcome-file> </welcome-file-list> -->
网上大部分都是这个的问题
servlet-mapping中的
<url-pattern>/</url-pattern>
错误信息中,我挑选重要的一段,我在项目中需要的也是这个问题,最后在不懈的努力下解决了,特写下这篇博客为后来遇到错误的人!
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature) at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:139) at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:107) ... 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.JarResourceSet.initInternal(JarResourceSet.java:137) ... 13 more
出现这类问题首先我们查看哪些包没下载完全
第一步:再pom.xml文件右键run as选择Maven test看是否报错,从报错信息中看缺失的包,如果没有报错,则进入第二步
第二步:在pom.xml文件下右键,run as选择maven build,再Goals下输入以下命令:clean install -U
运行,会有很多报错信息,在这些错误信息中找到缺失的包,只需要找到对应的目录,之后删掉那个文件夹,最后右键项目重新下载jar包
就可以更新maven的依赖包重新下载!下载好运行即可!
标签:控制 resources component web lazy localhost odi 网上 span
原文地址:https://www.cnblogs.com/kkxwze/p/13149966.html