- 浏览: 1330790 次
- 性别:
- 来自: 北京
文章分类
最新评论
-
kay11:
...
JAVA生成简单的随机字符串(a-zA-Z0-9) -
zhangliguoaccp:
您好关于登录页面的验验证码这块怎么解决的?还有登录成功后,跳转 ...
JAVA,模拟HTTP登录 -
107x:
不错,谢谢!
<c:foreach 循环 map -
wenjin:
不知楼主是不还在想请叫一下我自己开的Tomcat下载一个文件C ...
Android 下载文件及写入SD卡 -
zyywgf:
JSTL c标签,fn标签,fmt标签
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit
- 博客分类:
- J2EE
MyEclipse 开发 SSH 整合时 java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit 解决方案
这篇文章解决了问题, 核心提示:
发现用 MyEclipse 7.0 做 Struts 1.3 + Spring 2.5+ Hibernate 3.2 整合时启动过程中报如下的错误:
javax.servlet.ServletException: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\J2EE\Apache Software Foundation\Tomcat 6.0\webapps\ssh_chinamobile\WEB-INF\classes\applicationContext-base.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
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:286)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sessionFactory' defined in file [D:\J2EE\Apache Software Foundation\Tomcat 6.0\webapps\ssh_chinamobile\WEB-INF\classes\applicationContext-base.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
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1336)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
com.ssh.action.LoginAction.execute(LoginAction.java:47)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NoSuchMethodError: org.objectweb.asm.ClassVisitor.visit(IILjava/lang/String;Ljava/lang/String;[Ljava/lang/String;Ljava/lang/String;)V
net.sf.cglib.core.ClassEmitter.begin_class(ClassEmitter.java:77)
net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:173)
net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)
net.sf.cglib.core.KeyFactory$Generator.create(KeyFactory.java:145)
net.sf.cglib.core.KeyFactory.create(KeyFactory.java:117)
net.sf.cglib.core.KeyFactory.create(KeyFactory.java:108)
net.sf.cglib.core.KeyFactory.create(KeyFactory.java:104)
net.sf.cglib.proxy.Enhancer.<clinit>(Enhancer.java:69)
org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.getProxyFactory(CGLIBLazyInitializer.java:117)
org.hibernate.proxy.pojo.cglib.CGLIBProxyFactory.postInstantiate(CGLIBProxyFactory.java:43)
org.hibernate.tuple.entity.PojoEntityTuplizer.buildProxyFactory(PojoEntityTuplizer.java:162)
org.hibernate.tuple.entity.AbstractEntityTuplizer.<init>(AbstractEntityTuplizer.java:135)
org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:814)
org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:732)
org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:211)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1367)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1333)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:471)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory$1.run(AbstractAutowireCapableBeanFactory.java:409)
java.security.AccessController.doPrivileged(Native Method)
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:380)
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:264)
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:220)
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:185)
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:164)
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:423)
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:729)
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:381)
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
com.ssh.action.LoginAction.execute(LoginAction.java:47)
org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58)
org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67)
org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304)
org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190)
org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462)
javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
解决方案: 在GOOGLE上找着同样的问题。参考如下
Spring 和 Hibernate 共用的一些 jar 文件发生了版本冲突, 在spring Aop Libraries 下找到 org.objectweb.asm.ClassVisitor所在的jar包 (我电脑上asm包版本是 asm-2.2.3.jar).将其删除,然后重启 Tomcat.
发表评论
-
Spring 和JFreeChart 用出现Unable to validate using XSD
2012-08-09 17:31 1770错误显示: 信息: XML validation disab ... -
web.xml不认<taglib>解决办法:
2012-07-11 15:24 961在web.xml不认<taglib>解决办法: ... -
Portal服务器,Portlet容器,Portlet 的区别
2011-08-24 17:06 1646这里所说的Portal是指JCP-JSR168规范所描述的 ... -
AMF,RTMP,RTMPT,RTMPS(转)
2011-04-28 13:10 19221. AMF AMF(是Action Message F ... -
web.xml 中的listener,filter,servlet 加载顺序
2011-04-22 13:35 1103首先,加载顺序与它们 ... -
JDOM修改XML中指定节点的内容
2011-03-21 09:45 2187UpdateXML 写道 package com.util; ... -
SSH配置多个数据源
2011-01-18 16:35 9885SSH配置多个数据源 1. 编写hibernate的数据库配 ... -
SSH中调用存储过程
2010-12-29 08:46 5572SSH中调用带返回结果集的存储过程: public clas ... -
HibernateDaoSupport与JdbcDaoSupport总结
2010-12-28 13:56 1334Spring框架中Dao支持总结:Dao 的支持类可以有 ... -
DBCP,CP30及proxool连接池在spring+hibernate中的配置
2010-12-22 17:08 5924用spring默认的连接池性能效率不高, 如果数据库重启, 应 ... -
IP过滤DEMO
2010-11-01 15:59 1266import java.io.IOException; im ... -
FCKEditor Demo
2010-11-01 15:56 1991FCKEditor 的官方下载: http://source ... -
htmlunit带框架的简单处理测试demo
2010-07-07 14:58 3742package com.htmlunit.test; i ... -
模式在SSH中的简单举例
2010-05-17 14:37 1103闲着没事,瞎想,回想了几个简单的模式在SSH的应用。有不对的还 ... -
AspectJ入门 安装及简单使用
2010-05-15 19:20 7099一、下载安装 1. download http: ... -
org.apache.commons.lang.RandomStringUtils
2010-05-05 09:01 2015来自包:apache的commons-lang.jar包下载: ... -
spring字符集过滤器配置
2010-05-04 14:53 2630<!-- spring的字符集过滤器 --> ... -
Cannot instantiate abstract class or interface
2010-05-03 22:49 3959org.hibernate.InstantiationExce ... -
org.hibernate.hql.ast.QuerySyntaxException: ? is not mapped
2010-05-03 21:52 41292010-5-3 21:48:23 org.apache.ca ... -
JTA事务(转)
2010-04-30 16:33 9500JTA:Java Transaction API ...
相关推荐
在Java编程中,`java.lang.NoSuchMethodError`异常是一个运行时异常,通常发生在程序试图执行一个不存在的方法时。这个异常的出现通常意味着编译时和运行时的类版本不匹配,或者是在编译期间存在而运行时不存在的...
1) Error injecting constructor, java.lang.NoSuchMethodError: org.apache.maven.model.validation.DefaultModelValidator: method 'void ()' not found at org.jetbrains.idea.maven.server.embedder....
NULL 博文链接:https://albert0707.iteye.com/blog/562969
解决 java.lang.NoSuchMethodError 的错误 Java.lang.NoSuchMethodError 错误是一种常见的 Java 异常,它发生在 Java 虚拟机 (JVM) 无法找到某个类的特定方法时。这种错误可能是由于项目依赖比较复杂、Java 运行...
jackson-annotations-2.10.2.jar jackson-core-2.10.2.jar jackson-databind-2.10.2.jar NoClassDefFoundError解决
在Java编程中,`NoSuchMethodError` 是一个常见的运行时异常,它表示在类加载时找到了该类,但在该类中却找不到特定方法的定义。这个问题通常发生在不同版本的库之间存在不兼容的情况,即在编译时使用的库版本包含了...
在Java编程中,`java.lang.NoSuchMethodError`异常是一个运行时异常,通常发生在尝试执行一个在编译时可用但在运行时不可用的方法时。这个异常表明某个已经加载的类定义了一个方法,但该方法的实际行为无法被找到。...
在Java中,有时我们可能会遇到`java.lang.NoSuchMethodError`,这通常发生在运行时尝试执行一个在编译时存在但在运行时不存在的方法。对于这个问题,CGlib提供了解决方案。CGlib使用ASM库(一个Java字节码操纵和分析...
1.如果运行程序出现错误:“Exception in thread "main...3.错误:“Exception in thread "main" java.lang.NoSuchMethodError: org.slf4j.MDC.getCopyOfContextMap()Ljava/util/Map”,这是因为jar包版本冲突造成的。
用于解决struts2升级至2.3.37时 出现java.lang.NoSuchMethodError: com.opensymphony.xwork2.ActionContext.put(Ljava/lang/异常时,更换的xwork-core-2.3.37.jar
在Android开发过程中,有时会遇到一个令人困惑的错误——`java.lang.NoClassDefFoundError`。这个错误通常意味着在运行时找不到某个类的定义,即使编译时该类是可用的。在本例中,问题出在一个特定的情景:在Android...
java.lang.NoSuchMethodError: redis.clients.jedis.ScanResult.getStringCursor()Ljava/lang/String; at org.crazycake.shiro.WorkAloneRedisManager.keys(WorkAloneRedisManager.java:149) at org.crazycake....
java.lang.NoSuchMethodError: com.intellij.ide.plugins.PluginManagerCore.loadDescriptors()[Lcom/intellij/ide/plugins/IdeaPluginDescriptorImpl; at com.a.a.b.b.ar.a(ar.java:121) at com.a.a.b.b.ar.a(ar....
Android XmlResourceParser出错解决办法...java.lang.NoSuchMethodError: No interface method i()I in class Landroid/content/res/XmlResourceParser; or its super classes (declaration of 'android.content.res.Xm
Java Web标签大全是一个涵盖广泛的资源,它集合了各种Web开发技术中的标签库,包括JSP、JSTL、Struts1、Struts2、JSF、FreeMarker、Spring和Velocity等。这些技术在构建动态、交互式的Web应用程序时起着至关重要的...
java.lang.NoSuchMethodError 是一种方法不存在错误,指的是在程序中尝试调用某个类的方法,但是该类的定义中没有该方法的定义时抛出的异常。 27. java.lang.OutOfMemoryError 内存不足错误 java.lang....
Hibernate经典版 通过图解让你轻松学会Hibernate
java.lang.NoSuchMethodError: org.jboss.logging.Logger.getMessageLogger(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Object; 错误解决办法
因为在cglib简单使用的时候,和asm因为兼容问题运行老是失败。比如提示java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.(I)V 之类的乱七八糟的错误。最后通过使用正确的配套的版本使得程序成功运行。
登陆报错的问题 登录 java.lang.NoSuchMethodError: antlr.collections.AST.getLine()I 问题 导入数据库乱码解决方案: 人才管理系统项目详细文档说明 ========================================= 系统安装...