• Spring cglib 初始化 ExceptionInInitializerError,new Enhancer() 异常


    解决办法:更换 spring-cglib-repack-*.*.jar 包

    java.lang.ExceptionInInitializerError
        at org.springframework.aop.framework.CglibAopProxy.createEnhancer(CglibAopProxy.java:235)
        at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:177)
        at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:112)
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:497)
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:382)
        at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:338)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:423)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1696)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:245)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:743)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:767)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:489)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
        at inspect.into.spring.ann.b37.Lesson_b37.main(Lesson_b37.java:19)
    Caused by: java.lang.IllegalArgumentException
        at org.springframework.asm.MethodVisitor.<init>(MethodVisitor.java:86)
        at org.springframework.cglib.core.LocalVariablesSorter.<init>(LocalVariablesSorter.java:66)
        at org.springframework.cglib.core.CodeEmitter.<init>(CodeEmitter.java:106)
        at org.springframework.cglib.core.ClassEmitter.begin_method(ClassEmitter.java:176)
        at org.springframework.cglib.core.EmitUtils.null_constructor(EmitUtils.java:87)
        at org.springframework.cglib.core.KeyFactory$Generator.generateClass(KeyFactory.java:183)
        at org.springframework.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)
        at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:231)
        at org.springframework.cglib.core.KeyFactory$Generator.create(KeyFactory.java:149)
        at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:117)
        at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:109)
        at org.springframework.cglib.core.KeyFactory.create(KeyFactory.java:105)
        at org.springframework.cglib.proxy.Enhancer.<clinit>(Enhancer.java:71)
        ... 20 more
  • 相关阅读:
    update inner join
    Centos 7安装docker
    使用Let's Encrypt搭建永久免费的HTTPS服务
    upstream timed out (10060: A connection attempt failed because the connected party did not properly respond
    MySQL死锁分析一例
    solr定时更新索引遇到的问题(SolrDataImportProperties Error loading DataImportScheduler properties java.lang.NullPointerException)
    Java中的关键字 transient
    Spring 4 使用Freemarker模板发送邮件&添加附件
    Spring 4 创建REST API
    Spring 4 异常处理
  • 原文地址:https://www.cnblogs.com/xiluhua/p/8450204.html
Copyright © 2020-2023  润新知