小编典典

Tomcat服务器无法在STS中启动服务器和应用程序

java

当我运行Spring MVC应用程序时,出现此异常,服务器无法启动。

请帮助我解决此问题。

异常StackTrace:

Jan 24, 2013 11:33:59 AM org.apache.catalina.startup.ContextConfig processAnnotationsJar
SEVERE: Unable to process Jar entry [org/springframework/instrument/classloading/oc4j/package-info.class] from Jar [jar:file:/D:/works/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/dailyship/WEB-INF/lib/spring-context-3.1.0.RELEASE.jar!/] for annotations
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:56)
    at java.util.zip.ZipFile$ZipFileInputStream.read(ZipFile.java:677)
    at java.util.zip.ZipFile$ZipFileInflaterInputStream.fill(ZipFile.java:413)
    at java.util.zip.InflaterInputStream.read(InflaterInputStream.java:158)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:254)
    at java.io.DataInputStream.readInt(DataInputStream.java:387)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readID(ClassParser.java:237)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:114)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2104)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1980)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1946)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1931)
    at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1325)
    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:334)
    at java.util.concurrent.FutureTask.run(FutureTask.java:166)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
    at java.lang.Thread.run(Thread.java:722)

阅读 384

收藏
2020-09-08

共1个答案

小编典典

由于互联网连接不良,jar文件可能已损坏。尝试删除C:\Users\[username]\.m2\repository文件夹的内容。然后右键单击您的项目,选择“Maven” ,“ 更新项目” ,然后选中“ 强制更新快照/版本” 。如果您确定只有一个Jar文件有问题,则只需删除其文件夹。

2020-09-08