开发者社区> 问答> 正文

SpringBoot与 Seata 集成无法启动

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.�[0;39m
[ ] [main] �[34mINFO �[0;39m �[36mo.a.d.s.b.c.e.AwaitingNonWebApplicationListener�[0;39m - �[34m [Dubbo] Current Spring Boot Application is about to shutdown...�[0;39m
[ ] [main] �[1;31mERROR�[0;39m �[36mo.s.b.SpringApplication�[0;39m - �[1;31mApplication run failed�[0;39m
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'globalTransactionScanner' defined in class path resource [com/vivo/it/test1/config/SeataAutoConfig.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.seata.spring.annotation.GlobalTransactionScanner]: Factory method 'globalTransactionScanner' threw exception; nested exception is io.seata.common.exception.NotSupportYetException: not support register type: null
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:625)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:455)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1288)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1127)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:538)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:498)
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204)
	at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:228)
	at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:707)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531)
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:140)
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)
	at com.vivo.it.test1.TestDubboService1Application.main(TestDubboService1Application.java:37)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [io.seata.spring.annotation.GlobalTransactionScanner]: Factory method 'globalTransactionScanner' threw exception; nested exception is io.seata.common.exception.NotSupportYetException: not support register type: null
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:620)
	... 19 common frames omitted
Caused by: io.seata.common.exception.NotSupportYetException: not support register type: null
	at io.seata.config.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:80)
	at io.seata.config.ConfigurationFactory.getInstance(ConfigurationFactory.java:65)
	at io.seata.spring.annotation.GlobalTransactionScanner.<init>(GlobalTransactionScanner.java:81)
	at io.seata.spring.annotation.GlobalTransactionScanner.<init>(GlobalTransactionScanner.java:124)
	at io.seata.spring.annotation.GlobalTransactionScanner.<init>(GlobalTransactionScanner.java:113)
	at com.vivo.it.test1.config.SeataAutoConfig.globalTransactionScanner(SeataAutoConfig.java:44)
	at com.vivo.it.test1.config.SeataAutoConfig$$EnhancerBySpringCGLIB$$6687f6de.CGLIB$globalTransactionScanner$0(<generated>)
	at com.vivo.it.test1.config.SeataAutoConfig$$EnhancerBySpringCGLIB$$6687f6de$$FastClassBySpringCGLIB$$e469024b.invoke(<generated>)
	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
	at com.vivo.it.test1.config.SeataAutoConfig$$EnhancerBySpringCGLIB$$6687f6de.globalTransactionScanner(<generated>)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 20 common frames omitted
Caused by: java.lang.IllegalArgumentException: illegal type:null
	at io.seata.config.ConfigType.getType(ConfigType.java:62)
	at io.seata.config.ConfigurationFactory.buildConfiguration(ConfigurationFactory.java:78)
	... 35 common frames omitted

展开
收起
一人吃饱,全家不饿 2021-02-01 23:25:37 5058 0
来自:阿里开源
1 条回答
写回答
取消 提交回答
  • 启动的时候,没有配置seataConfigEnv,默认 是找到 dev.cfg 文件 增加dev 文件就可以了

    2021-02-01 23:25:52
    赞同 展开评论 打赏
来源圈子
更多
收录在圈子:
+ 订阅
阿里巴巴相信开源的世界里人人贡献代码,人人获得收益,共同创造一个互帮互利的社区,促进技术进步和发展。
问答排行榜
最热
最新

相关电子书

更多
《Seata 1.3 新特性以及如何参与社区》 立即下载
集成智能接入网关APP:优化企业级移动办公网络 立即下载
云效助力企业集成安全到DevOps中 立即下载