`
zhb8015
  • 浏览: 398285 次
  • 性别: Icon_minigender_1
  • 来自: 北京
博客专栏
Group-logo
Spring Roo杂谈
浏览量:0
社区版块
存档分类
最新评论

Caused by: java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.Exten

阅读更多

maven pom.xml关于hibernate的配置和异常信息如下,查了好多资料,问题还是没有解决。只知道是包冲突,就是不知道是哪个包....遇到这个问题的分享下是怎么解决的。。

 

maven pom:

 

		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-core</artifactId>
			<version>4.2.2.Final</version>
		</dependency>
		<dependency>
			<groupId>commons-collections</groupId>
			<artifactId>commons-collections</artifactId>
			<version>3.2.1</version>
		</dependency>
		<dependency>
			<groupId>org.hibernate</groupId>
			<artifactId>hibernate-validator</artifactId>
			<version>4.3.1.Final</version>
		</dependency>

 

 

 

异常信息:

 

Caused by: java.lang.IncompatibleClassChangeError: class org.hibernate.cfg.ExtendedMappings has interface org.hibernate.cfg.Mappings as super class
	at java.lang.ClassLoader.defineClass1(Native Method) ~[na:1.7.0_06]
	at java.lang.ClassLoader.defineClass(ClassLoader.java:791) ~[na:1.7.0_06]
	at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) ~[na:1.7.0_06]
	at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:2957) ~[catalina.jar:7.0.54]
	at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:1210) ~[catalina.jar:7.0.54]
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1690) ~[catalina.jar:7.0.54]
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1571) ~[catalina.jar:7.0.54]
	at org.hibernate.cfg.AnnotationConfiguration.createExtendedMappings(AnnotationConfiguration.java:187) ~[hibernate-annotations.jar:4.2.2.Final]
	at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:277) ~[hibernate-annotations.jar:4.2.2.Final]
	at org.hibernate.cfg.Configuration.buildMappings(Configuration.java:1316) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
	at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:717) ~[org.springframework.orm-3.0.5.RELEASE.jar:3.0.5.RELEASE]
	at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211) ~[org.springframework.orm-3.0.5.RELEASE.jar:3.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) ~[org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ~[org.springframework.beans-3.0.5.RELEASE.jar:3.0.5.RELEASE]
	... 35 common frames omitted

 

 

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics