我在春天有一点知识,现在我正在尝试将hibernate与spring集成,在我的项目中我正在使用下面的东西.hibernate,spring,maven,mysql.虽然使用这些东西我得到IncompatibleClassChnageError之前集成hibernate其工作正常,如果我删除配置xml文件中的hibernate配置然后它的工作正常
我认为这是依赖的问题(我无法理解哪个hibernate版本对于春季3.1.2是正确的)请任何人帮助我,我给我的所有文件.
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.myproject</groupId>
<artifactId>addaroot</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>addaroot Maven Webapp</name>
<url>http://maven.apache.org</url>
<!-- <build>
<finalName>${project.artifactId}-${project.version}</finalName>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build> -->
<!-- <properties>
<org.slf4j.version>1.6.4</org.slf4j.version>
<org.springframework.version>3.1.0.RELEASE</org.springframework.version>
</properties> -->
<properties>
<spring.version>3.1.2.RELEASE</spring.version>
</properties>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>commons-logging</groupId>
<artifactId>commons-logging</artifactId>
<version>1.1</version>
</dependency>
<dependency>
<groupId>org.glassfish.web</groupId>
<artifactId>javax.servlet.jsp.jstl</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</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>
<dependency> …Run Code Online (Sandbox Code Playgroud)