解决异常:java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(Z)V
启动服务报一下错误: 严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in ServletContext resource : Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(Z)V Caused by: java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(Z)V
因为cglib 包和asm包冲突
开始用的cglib包是cglib-2.1.3.jar ,后来换了一个cglib-nodep-2.2.jar才测试通过。 cglib-2.1.3.jar下载地址 http://dl.iteye.com/topics/download/480dc687-6870-3f12-8362-f01f7e07ee17
:idea: