`

NotFoundException: org.objectweb.asm.codevisitor

    博客分类:
  • WEB
阅读更多
严重: 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/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
Caused by: java.lang.NoClassDefFoundError: org/objectweb/asm/CodeVisitor
at net.sf.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:165)
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>(AbstractEntityTuplizer.java:135)
at org.hibernate.tuple.entity.PojoEntityTuplizer.<init>(PojoEntityTuplizer.java:55)
at org.hibernate.tuple.entity.EntityEntityModeToTuplizerMapping.<init>(EntityEntityModeToTuplizerMapping.java:56)
at org.hibernate.tuple.entity.EntityMetamodel.<init>(EntityMetamodel.java:295)
at org.hibernate.persister.entity.AbstractEntityPersister.<init>(AbstractEntityPersister.java:434)
at org.hibernate.persister.entity.SingleTableEntityPersister.<init>(SingleTableEntityPersister.java:109)
at org.hibernate.persister.PersisterFactory.createClassPersister(PersisterFactory.java:55)
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:226)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1294)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:805)
at org.springframework.orm.hibernate3.LocalSessionFactoryBean.buildSessionFactory(LocalSessionFactoryBean.java:745)
at org.springframework.orm.hibernate3.AbstractSessionFactoryBean.afterPropertiesSet(AbstractSessionFactoryBean.java:134)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1202)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1172)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:428)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:284)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)
at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:244)
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:187)
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:49)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3830)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4337)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
at org.apache.catalina.core.StandardService.start(StandardService.java:516)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
at org.apache.catalina.startup.Catalina.start(Catalina.java:566)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: java.lang.ClassNotFoundException: org.objectweb.asm.CodeVisitor
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1358)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1204)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
... 50 more
因hibernate 升级到3.1.3 以后,会使用升级的asm jar,而这个jar会去掉CodeVisitor 方法,
解决方法:
使用spring的cglib jar 不用hibernate的cglib
我使用的是cglib-nodep-2.1_3.jar
分享到:
评论
3 楼 K_2 2010-07-12  
cglib-nodep-2.1_3.jar 
2 楼 ziyangjiayi 2009-03-12  
1 楼 sunxing007 2008-10-16  

相关推荐

    NotFoundException: org.apache.commons.dbcp.BasicDataSource异常的解决方法

    本篇将详细探讨如何解决在Struts框架中遇到的`java.lang.ClassNotFoundException: org.apache.commons.dbcp.BasicDataSource`异常。 `org.apache.commons.dbcp.BasicDataSource`是Apache Commons DBCP库中的一个类...

    Android代码-javassist

    Java bytecode engineering toolkit Javassist version 3 ...Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation simple. It is a class library for editing bytecodes in Java;...

    谷歌的zxing方式生成二维码的jar包和已经写好的工具类

    二维码技术在现代移动设备中广泛使用,用于快速传递信息、链接网址、电子票务等多种场景。ZXing(Zebra Crossing)是谷歌推出的一个开源项目,它提供了二维码和条形码的读取与生成功能。本知识点主要围绕ZXing库如何...

    Android为textView设置setText的时候报错的讲解方案

    此外,错误堆栈信息中还提到了`android.content.res.Resources$NotFoundException`,这是因为在尝试获取资源时没有找到相应的资源。这通常是因为资源ID不存在或者在当前的资源包中没有定义。在这个特定的场景中,...

    java-adventures-resteasy-eap:博客文章http问题的POC

    你会得到类似的东西: 18:46:24,664 WARN [org.jboss.resteasy.core.ExceptionHandler] (http-/127.0.0.1:8080-1) failed to execute: javax.ws.rs.NotFoundException: Could not find resource for full path: ...

    Autojs调用zxing实现扫码

    调用zxing核心代码实现扫一扫功能 importClass... ...importClass(com.google.zxing.NotFoundException) importClass(com.google.zxing.DecodeHintType) importClass(com.google.zxing.BarcodeFormat)

    NotFoundException

    "NotFoundException"是Java编程语言中一个常见的异常类型,主要用于表示在程序执行过程中找不到特定资源或对象的情况。这个异常通常由Java虚拟机(JVM)抛出,当试图访问的类、方法、文件或其他资源不存在时,系统就...

    Java类库代码动态打补丁工具JavaAsist.rar

    java类库代码动态打补丁,可以在没有源代码的基础机型源代码级修改,文件类:URLClassPath.class,Translator.class,SerialVersionUID.class,NotFoundException.class,LoaderClassPath.class,DirClassPath.class...

    com.google.zxing.client.j2se.jar下载

    } catch (NotFoundException e) { System.out.println("No barcode found."); } ``` 5. **应用场景** - 文件处理:用户可以从本地文件系统上传图片,应用可以读取其中的条码信息。 - 屏幕捕获:开发者可以...

    自定义Adapt可能出现错误及其解决方法

    然而,在自定义Adapter的过程中可能会遇到各种各样的问题,其中一个较为少见但又难以调试的问题就是`E/AndroidRuntime(390): android.content.res.Resources$NotFoundException: Resource ID #0x7f030004`这样的异常...

    java 生成二维码 解析二位码 完整实例

    import com.google.zxing.NotFoundException; import com.google.zxing.ReaderException; import com.google.zxing.common.HybridBinarizer; import com.google.zxing.MultiFormatReader; ... BufferedImage...

    android-aapt-wrapperv1.1

    android-aapt-wrapperv1.1,解决eclipse 没有 --no-version-vectors参数,解决NotFoundException: File res/drawable/abc_vector_test.xml,详情参阅https://blog.csdn.net/hao43284/article/details/82699802

    Spring Cloud Gateway的全局异常处理

    if (error instanceof org.springframework.cloud.gateway.support.NotFoundException) { code = 404; } return response(code, this.buildMessage(request, error)); } /** * 指定响应处理方法为JSON处理的...

    java使用谷歌zxing实现二维码生成读取

    在IT行业中,二维码(Quick Response Code)已经成为数据交换和信息传递的重要工具,广泛应用于各种场景。Java作为一种跨平台的开发语言,提供了丰富的库来处理二维码的生成与读取。谷歌的ZXing(Zebra Crossing)...

    完整的利用itext5、zxing、QRCore制作pdf、二维码图片插入pdf,并解析pdf中的二维码信息

    } catch (NotFoundException e) { System.out.println("No QR code found."); } ``` 三、手机扫描验证 在Android应用中,可以使用QRCore库集成ZXing的二维码扫描功能。首先,需要在AndroidManifest.xml中添加相机...

    修改了中文乱码问题的ZXing包及例子

    ZXing,全称为“Zebra Crossing”,是一款由Google开发并维护的开源项目,主要用于生成和解码各种类型的条形码和二维码(QR Code)。这个项目提供了多种编程语言的API,包括Java,使得开发者能够轻松地在自己的应用...

    Android ZXing1.6核心类库(core.jar)

    com.google.zxing.NotFoundException.class com.google.zxing.Reader.class com.google.zxing.ReaderException.class com.google.zxing.Result.class com.google.zxing.ResultMetadataType.class ...

    二维码的生成和解析demo

    } catch (NotFoundException e) { System.out.println("无法解析二维码"); return; } System.out.println("解析结果:" + result.getText()); ``` 这个"java生成和解析二维码demo"项目可能包含了上述操作的...

Global site tag (gtag.js) - Google Analytics