简体   繁体   中英

invalid CEN header (bad signature)

I haven't worked on Java much but I am trying to upgrade the libabry. I am trying to run java google app engine project locally using maven and I am getting the error/warning message (listed below).

2018-05-17 14:39:55.050:INFO:oejs.Server:main: jetty-9.3.18.v20170406
2018-05-17 14:39:55.189:WARN:oejw.WebAppContext:main: Failed startup of context c.g.a.t.d.j.DevAppEngineWebAppContext@7995092a{/,file:///Users/user1/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/helloworld/,null}{/Users/asingh1/eclipse-workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/sap_gateway}
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:225)
at java.util.zip.ZipFile.<init>(ZipFile.java:155)
at java.util.jar.JarFile.<init>(JarFile.java:166)
at java.util.jar.JarFile.<init>(JarFile.java:103)
at sun.net.www.protocol.jar.URLJarFile.<init>(URLJarFile.java:93)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:69)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:84)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at sun.net.www.protocol.jar.JarURLConnection.getJarFile(JarURLConnection.java:89)
at org.eclipse.jetty.webapp.MetaInfConfiguration.getTlds(MetaInfConfiguration.java:409)
at org.eclipse.jetty.webapp.MetaInfConfiguration.scanForTlds(MetaInfConfiguration.java:326)
at org.eclipse.jetty.webapp.MetaInfConfiguration.scanJars(MetaInfConfiguration.java:143)
at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:94)
at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:485)
at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:521)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:131)
at org.eclipse.jetty.server.Server.start(Server.java:422)
at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:105)
at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:61)
at org.eclipse.jetty.server.Server.doStart(Server.java:389)
at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:68)
at com.google.appengine.tools.development.jetty9.JettyContainerService.startContainer(JettyContainerService.java:346)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:284)
at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:87)
at com.google.appengine.tools.development.Modules.startup(Modules.java:105)
at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:274)
at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:219)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:217)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:368)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:45)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:223)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:214)
2018-05-17 14:39:55.201:INFO:oejs.AbstractConnector:main: Started NetworkTrafficSelectChannelConnector@43ee72e6{HTTP/1.1,[http/1.1]}{localhost:8080}
2018-05-17 14:39:55.212:INFO:oejs.Server:main: Started @1089ms
May 17, 2018 6:39:55 PM com.google.appengine.tools.development.jetty9.JettyContainerService startHotDeployScanner

INFO: Full scan of the web app in place every 1s.

Java Version: jdk1.8.0_172 Maven version: 3.5.3 appengine.target.version: 1.9.63 maven-compiler-plugin: 3.7.0 (source and target:1.8) javax.servlet-api: 4.0.1

I have tried to remove .m2 folder and mvn clean install

Any help is appreciated! Thank you.

Thank you all for the help! The JAR file was fine on the source. I ran jarsigner verify on the source file I got unsigned message. When I ran the same command on the JAR file in the target folder, I got "invalid CEN header (bad signature)". Then I searched for JAR file corrupted during mvn build and then found the solution . The file was corrupted during mvn build process. I removed <filtering>true</filtering> from the pom.xml file and I stopped getting the error message.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM