在SSH集成中,Spring和hibernate会同时引入asm.jar包,因此出现版本冲突,异常信息如下:
aused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
at net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
at net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
at net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
at net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
at org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
at org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
at org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntit
我们只需将asm-2.2.3.jar移除,保留asm.jar即可!
相关推荐
在这个特定的场景中,异常堆栈跟踪显示 `Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.Type`,这表明在运行时,系统无法找到`org.objectweb.asm.Type`这个类。`org.objectweb.asm` 是一个用于...
严重: Exception sending context initialized event to listener instance ... nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type ssh 框架的java web项目部署到tomcat报上面错误 添加此包
4. //如果不用此包,在启动时会抛出: nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/Type 5. asm.jar 6. 7. // 如果不用此包,在启动时抛 出:nested exception is java.lang....
java.lang.NoClassDefFoundError:org/aspectj/weaver/reflect/ReflectionWorld$ReflectionWorldException和java.lang.NoClassDefFoundError:org/objectweb/asm/CodeVisitor 加入以上两个包顺利解决,希望能帮助到...
在这个特定的问题中,错误涉及到`org.objectweb.asm.CodeVisitor`类,这可能与MyEclipse集成的SSH(Struts、Spring、Hibernate)项目有关,因为ASM库是Java字节码操作和分析框架,常用于AOP(面向切面编程)和动态...
<groupId>org.objectweb.asm</groupId> <artifactId>asm</artifactId> </exclusion> </exclusions> </dependency> ``` ##### 3. Java.lang.NoClassDefFoundError异常 **问题描述**: 在运行时,可能会遇到`...
- **示例**:`java.lang.NoClassDefFoundError: org/objectweb/asm/Type`。 - **解决方法**: - 添加ASM库到项目的依赖中。 - 确认版本兼容性。 #### 结论 以上列举了一些常见的Java错误及其处理方法。理解这些...