maven项目启动报错 Unable to process Jar entry

jamsbwo 发布于 2016/10/26 18:24
阅读 2K+
收藏 0
严重: Unable to process Jar entry [javassist/util/proxy/SerializedProxy.class] from Jar [jar:file:/C:/apache-tomcat-7.0.27/webapps/hbhy/WEB-INF/lib/javassist-3.19.0-GA.jar!/] for annotations
java.io.EOFException
at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:57)
at org.apache.tomcat.util.bcel.classfile.Method.<init>(Method.java:71)
at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1934)
at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1900)
at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885)
at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1317)
at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5378)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:901)
at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:877)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:649)
at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1247)
at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1898)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
at java.util.concurrent.FutureTask.run(FutureTask.java:262)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)




加载中
0
d
dwangel

在本地库里找到这个jar然后命令行下跑maven package,让maven重新下载。

Eclipse里下载maven的依赖时有时会下不完整,而且还不能识别出错误……

0
EDIAGD
EDIAGD
这个jar包有问题,删除,重新依赖下载
0
阿信sxq
阿信sxq
将对应的本地缓存库的jar删除,然后重新打包,让maven重新下载
0
zparkdong
zparkdong

找到项目,右键, properties;找到Java  Build Path,双击JRE System Library【XXX】;

选择workspace default JRE(xxx) ;确定,apply一下,再启

0
jamsbwo
jamsbwo

谢谢各位,已经解决了

原因:

  maven库里有一个包含SerializedProxy类的jar,本地lib也包含一个,所以两个冲突了

办法:

    根本办法,删除maven库里的,直接办法,用一个无关的jar包重命名替换maven库里的

返回顶部
顶部