-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
type: bugSomething isn't workingSomething isn't working
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
In version 2.7.0.2 and 2.7.0.3-SNAPSHOT, ShenyuBootstrapApplication failed to run when using Nacos data sync.
2025-09-01 11:02:25 [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nacosSyncDataService' defined in class path resource [org/apache/shenyu/springboot/starter/sync/data/nacos/NacosSyncDataConfiguration.class]: Failed to instantiate [org.apache.shenyu.sync.data.api.SyncDataService]: Factory method 'nacosSyncDataService' threw exception with message: Error creating bean with name 'nacosConfigService' defined in class path resource [org/apache/shenyu/springboot/starter/sync/data/nacos/NacosSyncDataConfiguration.class]: Failed to instantiate [com.alibaba.nacos.api.config.ConfigService]: Factory method 'nacosConfigService' threw exception with message: null
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1337)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:975)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:962)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:624)
at org.springframework.boot.web.reactive.context.ReactiveWebServerApplicationContext.refresh(ReactiveWebServerApplicationContext.java:66)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:456)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:335)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
at org.apache.shenyu.bootstrap.ShenyuBootstrapApplication.main(ShenyuBootstrapApplication.java:35)
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.shenyu.sync.data.api.SyncDataService]: Factory method 'nacosSyncDataService' threw exception with message: Error creating bean with name 'nacosConfigService' defined in class path resource [org/apache/shenyu/springboot/starter/sync/data/nacos/NacosSyncDataConfiguration.class]: Failed to instantiate [com.alibaba.nacos.api.config.ConfigService]: Factory method 'nacosConfigService' threw exception with message: null
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
... 19 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'nacosConfigService' defined in class path resource [org/apache/shenyu/springboot/starter/sync/data/nacos/NacosSyncDataConfiguration.class]: Failed to instantiate [com.alibaba.nacos.api.config.ConfigService]: Factory method 'nacosConfigService' threw exception with message: null
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:648)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1337)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1167)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:562)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:522)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:337)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:335)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1443)
at org.springframework.beans.factory.support.DefaultListableBeanFactory$DependencyObjectProvider.getIfAvailable(DefaultListableBeanFactory.java:2112)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration.nacosSyncDataService(NacosSyncDataConfiguration.java:76)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration$$SpringCGLIB$$0.CGLIB$nacosSyncDataService$0(<generated>)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration$$SpringCGLIB$$0.nacosSyncDataService(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
... 20 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.api.config.ConfigService]: Factory method 'nacosConfigService' threw exception with message: null
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:177)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:644)
... 43 common frames omitted
Caused by: java.lang.NullPointerException: null
at java.base/java.util.concurrent.ConcurrentHashMap.putVal(ConcurrentHashMap.java:1011)
at java.base/java.util.concurrent.ConcurrentHashMap.put(ConcurrentHashMap.java:1006)
at java.base/java.util.Properties.put(Properties.java:1301)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration.nacosConfigService(NacosSyncDataConfiguration.java:97)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration$$SpringCGLIB$$0.CGLIB$nacosConfigService$1(<generated>)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration$$SpringCGLIB$$FastClass$$1.invoke(<generated>)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:348)
at org.apache.shenyu.springboot.starter.sync.data.nacos.NacosSyncDataConfiguration$$SpringCGLIB$$0.nacosConfigService(<generated>)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:140)
... 44 common frames omitted
Expected Behavior
No response
Steps To Reproduce
- shenyu-bootstrap use data sync. config the nacos properties in application.yml at
shenyu.sync.nacos. - run ShenyuBootstrapApplication.
Environment
ShenYu version(s): 2.7.0.2, 2.7.0.3-SNAPSHOTDebug logs
No response
Anything else?
No response
Metadata
Metadata
Assignees
Labels
type: bugSomething isn't workingSomething isn't working