我是 spring 开发的新手,我尝试为 spring orm 添加 maven 依赖项,在 pom.xml 文件中它在服务器启动时给出以下异常。此外,当我删除该依赖项时,异常发生了。你能告诉我这有什么问题吗?
谢谢。
SEVERE: Unable to process Jar entry [org/springframework/orm/jpa/JpaObjectRetrievalFailureException.class] from Jar [jar:file:/home/madhumal/mavenproj/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/wtpwebapps/NurseryApplication/WEB-INF/lib/spring-orm-3.1.2.RELEASE.jar!/] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid constant pool reference: 99. Constant pool size is: 25
at org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:184)
at org.apache.tomcat.util.bcel.classfile.ConstantPool.getConstant(ConstantPool.java:203)
at org.apache.tomcat.util.bcel.classfile.SourceFile.getSourceFileName(SourceFile.java:92)
at org.apache.tomcat.util.bcel.classfile.JavaClass.<init>(JavaClass.java:122)
下面是我的 pom.xml 文件。
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mad.maventest2.app</groupId>
<artifactId>NurseryApplication</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>war</packaging>
<name>NurseryApplication</name>
<properties>
<spring.version>3.1.2.RELEASE</spring.version>
<hibernate.version>4.1.6.Final</hibernate.version>
</properties>
<dependencies>
<!-- Spring 3 dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- Spring Security -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-web</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-config</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-orm</artifactId>
<version>${spring.version}</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.hibernate</groupId> -->
<!-- <artifactId>hibernate-core</artifactId> -->
<!-- <version>${hibernate.version}</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.hibernate</groupId> -->
<!-- <artifactId>hibernate-entitymanager</artifactId> -->
<!-- <version>${hibernate.version}</version> -->
<!-- </dependency> -->
<!-- other dependencies -->
<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.6</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-eclipse-plugin</artifactId>
<version>2.9</version>
<configuration>
<downloadSources>true</downloadSources>
<downloadJavadocs>true</downloadJavadocs>
<wtpversion>1.5</wtpversion>
</configuration>
</plugin>
</plugins>
</build>
</project>