java.util.zip.ZipException:无效的CEN头(错误的签名)(Tomcat 7 - Spring 4 - Java 6)

时间:2014-06-19 12:26:19

标签: java spring maven tomcat

我使用Spring 4和Maven创建了一个示例项目。但是当我在eclipse中在Tomcat上运行它时,我得到以下异常,我的应用程序无法运行。

Jun 19, 2014 5:15:50 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8090"]
Jun 19, 2014 5:15:50 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
Jun 19, 2014 5:15:50 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 1120 ms
Jun 19, 2014 5:15:50 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
Jun 19, 2014 5:15:50 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.34
Jun 19, 2014 5:15:50 PM org.apache.tomcat.util.scan.StandardJarScanner scan
WARNING: Failed to scan JAR [file:/C:/apache-tomcat-7.0.34/wtpwebapps/spring-4-mvc/WEB-INF/lib/spring-beans-4.0.5.RELEASE.jar] from WEB-INF/lib
java.util.zip.ZipException: invalid CEN header (bad signature)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:136)
    at java.util.jar.JarFile.<init>(JarFile.java:73)
    at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:80)
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
    at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
    at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41)
    at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
    at org.apache.catalina.startup.ContextConfig$FragmentJarScannerCallback.scan(ContextConfig.java:2625)
    at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241)
    at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:166)
    at org.apache.catalina.startup.ContextConfig.processJarsForWebFragments(ContextConfig.java:1917)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1268)
    at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:878)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:369)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.ContextConfig processServletContainerInitializers
SEVERE: Failed to process JAR found at URL [jar:file:/C:/apache-tomcat-7.0.34/wtpwebapps/spring-4-mvc/WEB-INF/lib/spring-beans-4.0.5.RELEASE.jar!/] for ServletContainerInitializers for context with name [/spring-4-mvc]
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.ContextConfig configureStart
SEVERE: Marking this application unavailable due to previous error(s)
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.TldConfig tldScanJar
WARNING: Failed to process JAR [jar:file:/C:/apache-tomcat-7.0.34/wtpwebapps/spring-4-mvc/WEB-INF/lib/spring-beans-4.0.5.RELEASE.jar!/] for TLD files
java.util.zip.ZipException: invalid CEN header (bad signature)
    at java.util.zip.ZipFile.open(Native Method)
    at java.util.zip.ZipFile.<init>(ZipFile.java:127)
    at java.util.jar.JarFile.<init>(JarFile.java:136)
    at java.util.jar.JarFile.<init>(JarFile.java:73)
    at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:72)
    at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:48)
    at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:80)
    at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:104)
    at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:71)
    at org.apache.tomcat.util.scan.FileUrlJar.<init>(FileUrlJar.java:41)
    at org.apache.tomcat.util.scan.JarFactory.newInstance(JarFactory.java:34)
    at org.apache.catalina.startup.TldConfig.tldScanJar(TldConfig.java:487)
    at org.apache.catalina.startup.TldConfig.access$100(TldConfig.java:58)
    at org.apache.catalina.startup.TldConfig$TldJarScannerCallback.scan(TldConfig.java:303)
    at org.apache.tomcat.util.scan.StandardJarScanner.process(StandardJarScanner.java:241)
    at org.apache.tomcat.util.scan.StandardJarScanner.scan(StandardJarScanner.java:166)
    at org.apache.catalina.startup.TldConfig.execute(TldConfig.java:277)
    at org.apache.catalina.startup.TldConfig.lifecycleEvent(TldConfig.java:567)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
    at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5173)
    at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
    at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
Jun 19, 2014 5:15:51 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Error getConfigured
Jun 19, 2014 5:15:51 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [/spring-4-mvc] startup failed due to previous errors
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.34\webapps\docs
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.34\webapps\examples
Jun 19, 2014 5:15:51 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: contextInitialized()
Jun 19, 2014 5:15:51 PM org.apache.catalina.core.ApplicationContext log
INFO: SessionListener: contextInitialized()
Jun 19, 2014 5:15:51 PM org.apache.catalina.core.ApplicationContext log
INFO: ContextListener: attributeAdded('org.apache.jasper.compiler.TldLocationsCache', 'org.apache.jasper.compiler.TldLocationsCache@6c43da1b')
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.34\webapps\host-manager
Jun 19, 2014 5:15:51 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.34\webapps\manager
Jun 19, 2014 5:15:52 PM org.apache.catalina.startup.HostConfig deployDirectory
INFO: Deploying web application directory C:\apache-tomcat-7.0.34\webapps\ROOT
Jun 19, 2014 5:15:52 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8090"]
Jun 19, 2014 5:15:52 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
Jun 19, 2014 5:15:52 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1770 ms

我已经附上了tomcat。不知道为什么会出现这种异常。

0 个答案:

没有答案