springaop与aspectjweaver

springaop与aspectjweaverorg.springframework.beans.factory.BeanCreationException:Errorcreatingbeanwithname’sysScheduleUserDateServiceImpl’definedinURL[jar:file:/C:/Users/Administrator/.m2/repository/com/ruoyi/ruoyi-schedule-one/3.4.0/ruoyi-schedule-one-3.4.0.jar!/com/ruo

大家好,又见面了,我是你们的朋友全栈君。

org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘sysScheduleUserDateServiceImpl’ defined in URL [jar:file:/C:/Users/Administrator/.m2/repository/com/ruoyi/ruoyi-schedule-one/3.4.0/ruoyi-schedule-one-3.4.0.jar!/com/ruoyi/schedule/service/serviceImpl/SysScheduleUserDateServiceImpl.class]: Initialization of bean failed; nested exception is org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is java.lang.IllegalStateException: Unable to load cache item
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:602)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141)
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747)
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:405)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:315)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215)
    at com.ruoyi.DocumentMicroservice.main(DocumentMicroservice.java:25)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
Caused by: org.springframework.aop.framework.AopConfigException: Unexpected AOP exception; nested exception is java.lang.IllegalStateException: Unable to load cache item
    at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:214)
    at org.springframework.aop.framework.ProxyFactory.getProxy(ProxyFactory.java:110)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.createProxy(AbstractAutoProxyCreator.java:471)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.wrapIfNecessary(AbstractAutoProxyCreator.java:350)
    at org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator.postProcessAfterInitialization(AbstractAutoProxyCreator.java:299)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:430)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1798)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594)
    … 20 common frames omitted
Caused by: java.lang.IllegalStateException: Unable to load cache item
    at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:79)
    at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34)
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:134)
    at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:319)
    at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:572)
    at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:419)
    at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:57)
    at org.springframework.aop.framework.CglibAopProxy.getProxy(CglibAopProxy.java:205)
    … 27 common frames omitted
Caused by: java.lang.LinkageError: loader constraint violation: when resolving overridden method “com.ruoyi.schedule.service.serviceImpl.SysScheduleUserDateServiceImpl$$EnhancerBySpringCGLIB$$572e3ef4.updateScheduleDate(Lcom/alibaba/fastjson/JSONObject;)Lcom/ruoyi/schedule/result/LocalResult;” the class loader (instance of org/springframework/boot/devtools/restart/classloader/RestartClassLoader) of the current class, com/ruoyi/schedule/service/serviceImpl/SysScheduleUserDateServiceImpl$$EnhancerBySpringCGLIB$$572e3ef4, and its superclass loader (instance of sun/misc/Launcher$AppClassLoader), have different Class objects for the type com/alibaba/fastjson/JSONObject used in the signature
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:348)
    at org.springframework.cglib.core.ReflectUtils.defineClass(ReflectUtils.java:571)
    at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:363)
    at org.springframework.cglib.proxy.Enhancer.generate(Enhancer.java:585)
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:110)
    at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData$3.apply(AbstractClassGenerator.java:108)
    at org.springframework.cglib.core.internal.LoadingCache$2.call(LoadingCache.java:54)
    at java.util.concurrent.FutureTask.run$$$capture(FutureTask.java:266)
    at java.util.concurrent.FutureTask.run(FutureTask.java)

Unexpected AOP exception; nested exception is java.lang.IllegalStateException: 解决
原因
解决办法
原因
spring-aop版本与 aspectjweaver 包版本冲突

解决办法
我的maven项目的spring-aop版本是5.1.9,其他的spring版本是5.2.1,aspectjweaver 版本是1.8.3,将spring-aop的版本改成5.2.1,运行正常
项目中并没有用到spring-aop包,用的是aspectjweaver ,直接将spring-aop删掉,运行正常
————————————————
版权声明:本文为CSDN博主「闭着眼睛听风声」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_40301107/article/details/103290420

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请联系我们举报,一经查实,本站将立刻删除。

发布者:全栈程序员-站长,转载请注明出处:https://javaforall.net/158137.html原文链接:https://javaforall.net

(0)
上一篇 2022年7月12日 上午9:00
下一篇 2022年7月12日 上午9:00


相关推荐

  • 使用 UDP 数据包发送消息

    使用 UDP 数据包发送消息使用 UDP 数据包发送短的文本消息实现是很简单的并且提供可一个非常轻量级的消息传递通道 但是这种模式有很大的缺陷 就是不保证的数据的可靠性 有可能会存在丢包的情况 甚至严重的情况就是服务器不可用的时候 会完全丢失你的消息 不过这个任务会在有些情况下十分有作用 你不关心消息是否丢失 你不想要终止程序只是因为消息无法传递 server pyimportsock 8081s socket socket socket AF INET socket SOCK DGRAM

    2026年3月16日
    2
  • mysql中nvl_浅谈Mysql中类似于nvl()函数的ifnull()函数

    mysql中nvl_浅谈Mysql中类似于nvl()函数的ifnull()函数IFNULL(expr1,expr2)如果expr1不是NULL,IFNULL()返回expr1,否则它返回expr2。IFNULL()返回一个数字或字符串值,取决于它被使用的上下文环境。mysql>selectIFNULL(1,0);->1mysql>selectIFNULL(0,10);->0mysql>selectIFNULL(1/0,10);-…

    2022年7月13日
    21
  • bigdecimal保留2位小数_java如何保留一位小数

    bigdecimal保留2位小数_java如何保留一位小数http://blog.csdn.net/yuhua3272004/article/details/3075436使用java.math.BigDecimal工具类实现java保留两位小数问题:方式一(四舍五入形式保留两位小数,注意模式ROUND_HALF_UP):四舍五入doublef=111231.5585;BigDecimal…

    2026年2月20日
    3
  • BootStrap表格详解

    BootStrap表格详解表格 html 表格标签用 table 标签表示 每一行由 tr 表示 表格是由行组成 行由列组成 列由 td 单元格组成 table tr td 1 td td 2 td td 3 td td 4 td tr table td tr

    2026年3月18日
    3
  • 复合辛普森公式c语言编程,复合辛普森公式

    复合辛普森公式c语言编程,复合辛普森公式复合辛普森公式 由会员分享 可在线阅读 更多相关 复合辛普森公式 5 页珍藏版 请在人人文库网上搜索 1 精选文档实验 5 复合辛普森公式李涛 8 计自 1201 一 实验目的 l 用复合辛普森公式计算积分 使误差不超过 注意所给积分特点 做出相应的处理后再计算 二 实验步骤 1 算法原理复合辛普森原理 将区间划分为 n 等分 在每个子区间上采用辛普森公式 若记则得 ll 记 ll 称为

    2026年3月20日
    4

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注

关注全栈程序员社区公众号