引入seata, 不能反向代理DruidDataSourceWrapper, 启动报错

Blade 未结 1 653
k365266378
k365266378 剑童 2021-08-05 18:46

一、该问题的重现步骤是什么?

1. 按照开发手册引入seata

2. 正常启动项目

3.


二、你期待的结果是什么?实际看到的又是什么?

可以正常启动, 实际报错

三、你正在使用的是什么产品,什么版本?在什么操作系统上?

使用2.7.1  在ios系统上。

四、请提供详细的错误堆栈信息,这很重要。

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Initialization of bean failed; nested exception is java.lang.IllegalArgumentException

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:603)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:517)

at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:323)

at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)

at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:321)

at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)

at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1304)

at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1224)

at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)

at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)

... 112 common frames omitted

Caused by: java.lang.IllegalArgumentException: null

at org.objectweb.asm.ClassReader.<init>(Unknown Source)

at org.objectweb.asm.ClassReader.<init>(Unknown Source)

at org.objectweb.asm.ClassReader.<init>(Unknown Source)

at net.sf.cglib.proxy.BridgeMethodResolver.resolveAll(BridgeMethodResolver.java:61)

at net.sf.cglib.proxy.Enhancer.emitMethods(Enhancer.java:911)

at net.sf.cglib.proxy.Enhancer.generateClass(Enhancer.java:498)

at net.sf.cglib.core.DefaultGeneratorStrategy.generate(DefaultGeneratorStrategy.java:25)

at net.sf.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:216)

at net.sf.cglib.proxy.Enhancer.createHelper(Enhancer.java:377)

at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:285)

at net.sf.cglib.proxy.Enhancer.create(Enhancer.java:663)

at io.seata.spring.annotation.datasource.SeataDataSourceBeanPostProcessor.proxyDataSource(SeataDataSourceBeanPostProcessor.java:77)

at io.seata.spring.annotation.datasource.SeataDataSourceBeanPostProcessor.postProcessAfterInitialization(SeataDataSourceBeanPostProcessor.java:52)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsAfterInitialization(AbstractAutowireCapableBeanFactory.java:431)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800)

at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:595)

... 122 common frames omitted

五、若有更多详细信息,请在下面提供。

1条回答
  • 商业用户按文档步骤继承即可。

    FGGBY@{@CLSEAVVOVM]HO_K.png

    0 讨论(0)
提交回复