[spring] org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljav 解决
严重: 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 [/WEB-INF/classes/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
Caused
by: java.lang.NoSuchMethodError:
org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
严重: Error listenerStart
2011-2-15 20:09:18 org.apache.catalina.core.StandardContext start
严重: Context [/h1] startup failed due to previous errors
2011-2-15 20:09:18 org.apache.catalina.core.ApplicationContext log
信息: Closing Spring root WebApplicationContext
2011-2-15 20:09:18 org.apache.coyote.http11.Http11Protocol start
信息: Starting Coyote HTTP/1.1 on http-8080
2011-2-15 20:09:18 org.apache.catalina.loader.WebappClassLoader loadClass
信
息: Illegal access: this web application instance has been stopped
already. Could not load java.net.BindException. The eventual following
stack trace is caused by an error thrown for debugging purposes as well
as to attempt to terminate the thread which caused the illegal access,
and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
2011-2-15 20:09:18 org.apache.catalina.loader.WebappClassLoader loadClass
信
息: Illegal access: this web application instance has been stopped
already. Could not load com.mysql.jdbc.Util. The eventual following
stack trace is caused by an error thrown for debugging purposes as well
as to attempt to terminate the thread which caused the illegal access,
and has no functional impact.
java.lang.IllegalStateException
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1244)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
2011-2-15 20:09:18 org.apache.jk.common.ChannelSocket init
信息: JK: ajp13 listening on /0.0.0.0:8009
2011-2-15 20:09:18 org.apache.jk.server.JkMain start
信息: Jk running ID=0 time=0/125 config=null
2011-2-15 20:09:18 org.apache.catalina.startup.Catalina start
信息: Server startup in 6798 ms
在使用Spring的AOP编程时,会用到这几个lib:
asm-2.2.2.jar
asm-commons-2.2.2.jar
asm-util-2.2.2.jar
Hibernate使用如果lib:
asm.jar
asm-attrs.jar
其中asm-2.2.2.jar与asm.jar存在类上的冲突!!!
使用其中之一或两者都使用,可能会出现如下错误:
java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
java.lang.NoClassDefFoundError: org/objectweb/asm/commons/EmptyVisitor
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit。。。。。。
解决办法是:
1.去掉类路径上的关于Hibernate的3个lib
asm.jar
asm-attrs.jar
cglib-2.1.3.jar
2.加入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
最新文章
- C#中5步完成word文档打印的方法
- Quartz 线程处理
- js继承精益求精之寄生式组合继承
- struts过滤器和拦截器的区别
- ABBYY可以给我们解决那些问题
- zip&;rar格式压缩包的解压缩
- linq性能剖析
- Apache Wamp WampServer 配置多端口 多站点 虚拟目录
- c#基础语言编程-常用函数
- C++ 标准时间线
- Hadoop生态圈初识
- Python捕捉系统信号
- maya cmds pymel 'ESC' 退出 while, for 循环
- 7:CSS Sprites的原理(图片整合技术)
- python学习 day20 (3月27日)----(单继承多继承c3算法)
- java后台校验 hibernate validator
- 解析XML异常
- Python modf() 函数
- Ubuntu16.04安装Nessus和MSF
- JAVA基础之——方法直接用类名.的理解