bug宝典JAVA篇 java.util.zip.ZipException: invalid LOC header (bad signature)

在eclipse中执行命令jetty:run,出现下面的异常

2017-02-27 15:50:37.636:INFO:oejs.Server:jetty-8.1.2.v20120308
2017-02-27 15:50:38.228:WARN:oejw.WebAppContext:Failed startup of context o.m.j.p.JettyWebAppContext{/,file:/F:/bwjf2017/enterpriseSNS/src/main/webapp/},file:/F:/bwjf2017/enterpriseSNS/src/main/webapp/
java.util.zip.ZipException: invalid distance too far back
	at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:164)
	at java.util.zip.ZipInputStream.read(ZipInputStream.java:194)
	at java.util.jar.JarInputStream.read(JarInputStream.java:207)
	at java.util.zip.ZipInputStream.closeEntry(ZipInputStream.java:140)
	at java.util.zip.ZipInputStream.getNextEntry(ZipInputStream.java:118)
	at java.util.jar.JarInputStream.getNextEntry(JarInputStream.java:142)
	at java.util.jar.JarInputStream.getNextJarEntry(JarInputStream.java:179)
	at org.eclipse.jetty.webapp.JarScanner.matched(JarScanner.java:156)
	at org.eclipse.jetty.util.PatternMatcher.matchPatterns(PatternMatcher.java:82)
	at org.eclipse.jetty.util.PatternMatcher.match(PatternMatcher.java:64)
	at org.eclipse.jetty.webapp.JarScanner.scan(JarScanner.java:78)
	at org.eclipse.jetty.webapp.MetaInfConfiguration.preConfigure(MetaInfConfiguration.java:78)
	at org.eclipse.jetty.webapp.WebAppContext.preConfigure(WebAppContext.java:417)
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:453)
	at org.mortbay.jetty.plugin.JettyWebAppContext.doStart(JettyWebAppContext.java:256)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
	at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
	at org.eclipse.jetty.server.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:167)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
	at org.eclipse.jetty.server.handler.HandlerCollection.doStart(HandlerCollection.java:224)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:90)
	at org.eclipse.jetty.server.Server.doStart(Server.java:263)
	at org.mortbay.jetty.plugin.JettyServer.doStart(JettyServer.java:65)
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:59)
	at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:511)
	at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:364)
	at org.mortbay.jetty.plugin.JettyRunMojo.execute(JettyRunMojo.java:516)
	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:106)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)
	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:152)
	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:555)
	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:214)
	at org.apache.maven.cli.MavenCli.main(MavenCli.java:158)
	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:497)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
2017-02-27 15:50:38.460:INFO:oejs.AbstractConnector:Started [email protected]:8080

现象:使用mvn install -Dskiptest,可以正常生成war包,但是将war放入到tomcat中启动,则提示下面的异常信息

27-Feb-2017 14:33:03.581 SEVERE [main] org.apache.coyote.AbstractProtocol.init Failed to initialize end point associated with ProtocolHandler ["http-apr-8080"]
 java.lang.Exception: Socket bind failed: [730013] ???????????????í????×??????·??????×?
	at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:431)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:727)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:456)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:834)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
	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:497)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)

27-Feb-2017 14:33:03.596 SEVERE [main] org.apache.catalina.core.StandardService.initInternal Failed to initialize connector [Connector[HTTP/1.1-8080]]
 org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8080]]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
	at org.apache.catalina.core.StandardService.initInternal(StandardService.java:567)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:834)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:576)
	at org.apache.catalina.startup.Catalina.load(Catalina.java:599)
	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:497)
	at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:310)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:484)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:962)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	... 12 more
Caused by: java.lang.Exception: Socket bind failed: [730013] ???????????????í????×??????·??????×?
	at org.apache.tomcat.util.net.AprEndpoint.bind(AprEndpoint.java:431)
	at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:727)
	at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:456)
	at org.apache.catalina.connector.Connector.initInternal(Connector.java:960)
	... 13 more

27-Feb-2017 14:33:03.599 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
27-Feb-2017 14:33:03.604 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2511 ms
27-Feb-2017 14:33:03.693 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
27-Feb-2017 14:33:03.694 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
27-Feb-2017 14:33:04.426 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGenerator.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [317] milliseconds.
27-Feb-2017 14:33:04.541 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive D:\Program Files\apache-tomcat-8.0.9.1\webapps\sns.war
27-Feb-2017 14:33:09.632 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sns]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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 start component [org.apache.catalina.webresources.StandardRoot@44653826]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4863)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4992)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 10 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@4df2890b]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
	at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:662)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 13 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
	at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:94)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	... 16 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:716)
	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:92)
	... 17 more

27-Feb-2017 14:33:20.078 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive D:\Program Files\apache-tomcat-8.0.9.1\webapps\sns.war
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sns]]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:727)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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)

27-Feb-2017 14:33:20.088 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deployment of web application archive D:\Program Files\apache-tomcat-8.0.9.1\webapps\sns.war has finished in 15,546 ms
27-Feb-2017 14:33:20.225 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["ajp-apr-8009"]
27-Feb-2017 14:33:20.370 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in 16764 ms
27-Feb-2017 16:03:58.840 INFO [main] org.apache.catalina.core.AprLifecycleListener.init Loaded APR based Apache Tomcat Native library 1.1.30 using APR version 1.4.8.
27-Feb-2017 16:03:58.843 INFO [main] org.apache.catalina.core.AprLifecycleListener.init APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
27-Feb-2017 16:03:58.979 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{
     Server/Service/Engine/Host} Setting property 'xmlValidation' to 'false' did not find a matching property.
27-Feb-2017 16:03:58.980 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{
     Server/Service/Engine/Host} Setting property 'xmlNamespaceAware' to 'false' did not find a matching property.
27-Feb-2017 16:03:59.033 WARNING [main] org.apache.tomcat.util.digester.SetPropertiesRule.begin [SetPropertiesRule]{
     Server/Service/Engine/Host/Context} Setting property 'debug' to '0' did not find a matching property.
27-Feb-2017 16:04:00.208 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized (OpenSSL 1.0.1g 7 Apr 2014)
27-Feb-2017 16:04:00.476 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-apr-8080"]
27-Feb-2017 16:04:00.522 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["ajp-apr-8009"]
27-Feb-2017 16:04:00.526 INFO [main] org.apache.catalina.startup.Catalina.load Initialization processed in 2368 ms
27-Feb-2017 16:04:00.568 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service Catalina
27-Feb-2017 16:04:00.569 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet Engine: Apache Tomcat/8.0.9
27-Feb-2017 16:04:01.883 INFO [localhost-startStop-1] org.apache.catalina.util.SessionIdGenerator.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [772] milliseconds.
27-Feb-2017 16:04:01.932 INFO [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Deploying web application archive D:\Program Files\apache-tomcat-8.0.9.1\webapps\sns.war
27-Feb-2017 16:04:14.448 SEVERE [localhost-startStop-1] org.apache.catalina.core.ContainerBase.addChildInternal ContainerBase.addChild: start: 
 org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sns]]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:724)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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 start component [org.apache.catalina.webresources.StandardRoot@17b47072]
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
	at org.apache.catalina.core.StandardContext.resourcesStart(StandardContext.java:4863)
	at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4992)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 10 more
Caused by: org.apache.catalina.LifecycleException: Failed to initialize component [org.apache.catalina.webresources.JarResourceSet@159ac0f3]
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:139)
	at org.apache.catalina.webresources.StandardRoot.startInternal(StandardRoot.java:662)
	at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
	... 13 more
Caused by: java.lang.IllegalArgumentException: java.util.zip.ZipException: invalid LOC header (bad signature)
	at org.apache.catalina.webresources.JarResourceSet.initInternal(JarResourceSet.java:94)
	at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
	... 16 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:716)
	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:92)
	... 17 more

27-Feb-2017 16:04:14.476 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive D:\Program Files\apache-tomcat-8.0.9.1\webapps\sns.war
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/sns]]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:727)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:700)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:714)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:919)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1704)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	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)

网上的都会提示是什么jar保冲突了,但是我这里却没有报这个错误,于是我想到更改maven-compiler-plugin插件的版本,再次执行jetty:run,终于出现能够看得懂的异常信息

[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] 读取D:\Program Files (x86)\apache-maven-3.1.1\repository\ognl\ognl\3.0.6\ognl-3.0.6.jar时出错; invalid LOC header (bad signature)
[ERROR] 读取D:\Program Files (x86)\apache-maven-3.1.1\repository\ognl\ognl\3.0.6\ognl-3.0.6.jar时出错; cannot read zip file entry
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/enterprise/action/convertor/ObjectIdConvertor.java:[5,12] 程序包ognl不存在
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/enterprise/action/convertor/ObjectIdConvertor.java:[13,40] 找不到符号
  符号: 类 DefaultTypeConverter
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/common/security/StringConvertor.java:[5,12] 程序包ognl不存在
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/common/security/StringConvertor.java:[9,38] 找不到符号
  符号: 类 DefaultTypeConverter
[INFO] 6 errors 
[INFO] -------------------------------------------------------------
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 7.599s
[INFO] Finished at: Tue Feb 28 10:20:27 CST 2017
[INFO] Final Memory: 22M/338M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project enterpriseSNS: Compilation failure: Compilation failure:
[ERROR] 读取D:\Program Files (x86)\apache-maven-3.1.1\repository\ognl\ognl\3.0.6\ognl-3.0.6.jar时出错; invalid LOC header (bad signature)
[ERROR] 读取D:\Program Files (x86)\apache-maven-3.1.1\repository\ognl\ognl\3.0.6\ognl-3.0.6.jar时出错; cannot read zip file entry
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/enterprise/action/convertor/ObjectIdConvertor.java:[5,12] 程序包ognl不存在
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/enterprise/action/convertor/ObjectIdConvertor.java:[13,40] 找不到符号
[ERROR] 符号: 类 DefaultTypeConverter
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/common/security/StringConvertor.java:[5,12] 程序包ognl不存在
[ERROR] /F:/bwjf2017/enterpriseSNS/src/main/java/com/fz/common/security/StringConvertor.java:[9,38] 找不到符号

说的是ognl3.0.6有问题,使用jd-gui打开看,发现很多class为空。
bug宝典JAVA篇 java.util.zip.ZipException: invalid LOC header (bad signature)_第1张图片
于是我从中央仓库中下载
替换本地maven仓库中的对应的jar,问题就解决了。
总结
其他人可能只是jar不一样,但是处理问题的思路都可以参照上面的所说的。

你可能感兴趣的:(bug宝典,java,bug)