0

我有一个春季项目。当我运行时出现以下错误

SEVERE: Unable to process Jar entry [javax/validation/bootstrap/GenericBootstrap.class] 
from Jar [jar:file:/D:/Personal%20Work/eclipse%2032%20Bit/workspace/Java%20EE/Spring
/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps
/ch17_ImplementTheViewsForContactInformation/WEB-INF/lib/validation-api-1.0.0.GA.jar!/] 
for annotations
java.util.zip.ZipException: invalid LOC header (bad signature)
at java.util.zip.ZipFile.read(Native Method)
    ....

这是我的 POM 片段

<dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-entitymanager</artifactId>
        <version>4.3.0.Beta2</version>
    </dependency>

    <!-- Hibernate’s implementation of JSR-303. -->
    <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>4.2.0.Final</version>
    </dependency>

    <!-- The JSR-303 Bean Validation API library. -->
    <dependency>
       <groupId>javax.validation</groupId>
       <artifactId>validation-api</artifactId>
       <version>1.0.0.GA</version> 
    </dependency>

为什么我收到此错误?我查了一下,我在 location 有这个罐子C:\Users\basit.ahmed\.m2\repository\javax\validation\validation-api\1.0.0.GA

我该如何解决这个问题?

谢谢

4

1 回答 1

2

这可能是下载错误的结果。从本地存储库中删除 jar,然后重试。

于 2013-06-11T12:01:25.547 回答