------------------org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of model.Item was altered from 1 to null; nested exception is org.hibernate.HibernateException: identifier of an instance of model.Item was altered from 1 to null
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
信息: Initializing Spring root WebApplicationContext
------------------org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of model.Item was altered from 1 to null; nested exception is org.hibernate.HibernateException: identifier of an instance of model.Item was altered from 1 to null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
ben(624072547) 08:15:26
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
ben(624072547) 08:15:43
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:955)
信息: Initializing Spring root WebApplicationContext
------------------org.springframework.orm.hibernate3.HibernateSystemException: identifier of an instance of model.Item was altered from 1 to null; nested exception is org.hibernate.HibernateException: identifier of an instance of model.Item was altered from 1 to null
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'DataSource' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
ben(624072547) 08:15:26
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
ben(624072547) 08:15:43
在使用Spring的AOP编程时,会用到这几个lib:
asm-2.2.2.jar
asm-commons-2.2.2.jar
asm-util-2.2.2.jarHibernate使用如果lib:
asm.jar
asm-attrs.jar解决办法是:
1.去掉类路径上的关于Hibernate的3个lib
asm.jar
asm-attrs.jar
cglib-2.1.3.jar2.加入Spring中的以下4个lib
asm-2.2.2.jar
asm-commons-2.2.2.jar
asm-util-2.2.2.jar
cglib-nodep-2.1_3.jar