apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.08k stars 8.73k forks source link

Seata + JPA + IDEA + jrebel debug启动报错 #3298

Open casuak opened 3 years ago

casuak commented 3 years ago

Ⅰ. Issue Description

Seata + JPA + IDEA + jrebel debug启动报错 jrebel是IDEA的一个热部署插件,不用这个插件时可以正常启动

Ⅱ. Describe what happened

启动报错: Caused by: java.lang.NoSuchFieldException: advised at java.lang.Class.getDeclaredField(Class.java:2070) ~[na:1.8.0_171] at io.seata.spring.util.SpringProxyUtils.getAdvisedSupport(SpringProxyUtils.java:107) ~[seata-all-1.4.0.jar:1.4.0] at io.seata.spring.util.SpringProxyUtils.findTargetClass(SpringProxyUtils.java:51) ~[seata-all-1.4.0.jar:1.4.0] at io.seata.spring.annotation.GlobalTransactionScanner.wrapIfNecessary(GlobalTransactionScanner.java:256) ~[seata-all-1.4.0.jar:1.4.0] ... 29 common frames omitted

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

我的项目环境是springboot + dubbo + seata + jpa,使用IDEA的jrebel插件启动项目就会报错

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

zqxin45 commented 3 years ago

大佬,碰到相同问题了,怎么解决的

casuak commented 3 years ago

不用jpa,改用mybatis-plus

zqxin45 commented 3 years ago

这有点难啊,先不用了jrebel

54zhangjunzhe commented 1 year ago

怎么解决呢?就是不兼容不要用jrebel对吗?

guiqingle520 commented 1 month ago

最近我也遇到了,这个问题还有大佬跟进或者解决了吗??

54zhangjunzhe commented 3 weeks ago

没有解决,应该是jar包冲突了。

---原始邮件--- 发件人: @.> 发送时间: 2024年5月10日(周五) 上午10:00 收件人: @.>; 抄送: @.**@.>; 主题: Re: [apache/incubator-seata] Seata + JPA + IDEA + jrebel debug启动报错 (#3298)

最近我也遇到了,这个问题还有大佬跟进或者解决了吗??

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.Message ID: @.***>

liuzhenggang commented 2 weeks ago

image

seate源码根据proxy创建的InvocationHandler不一样。

image 能根据反射获取到获取advised字段。

image 不能根据反射获取到获取advised字段。

JiangJuHong commented 1 week ago

通过禁用seata可以解决此问题,在 seata.yaml 中配置seata.enabled: false(仅适用于开发环境,生产环境别乱搞),此解决方案属于临时解决方案,理想中的方案还是seata和jrebel能够同时存在,坐等官方回复

funky-eyes commented 1 week ago

通过禁用seata可以解决此问题,在 seata.yaml 中配置seata.enabled: false(仅适用于开发环境,生产环境别乱搞),此解决方案属于临时解决方案,理想中的方案还是seata和jrebel能够同时存在,坐等官方回复

你可以自定义跳过bean扫描的逻辑 You can customize the logic of skipping bean scans

JiangJuHong commented 1 week ago

通过禁用seata可以解决此问题,在 seata.yaml 中配置seata.enabled: false(仅适用于开发环境,生产环境别乱搞),此解决方案属于临时解决方案,理想中的方案还是seata和jrebel能够同时存在,坐等官方回复

你可以自定义跳过bean扫描的逻辑 You can customize the logic of skipping bean scans

麻烦问下有Example或相关Issus吗