CoimLuo opened a new issue #1902:
URL: https://github.com/apache/incubator-shenyu/issues/1902


   ## Describe the bug
   <!--
   A clear and concise description of what the bug is.
   -->
   
   ## Environment
   
   - ShenYu version(s): 2.4.0
   
   ## Steps to reproduce
   use /api/v1 as shenyu.client.props.contextPath
   
   
   ## Expected behavior
   <!--
   A clear and concise description of what you expected to happen.
   -->
   
   ## Debug logs
   2021-08-09 14:11:30 [main] ERROR org.springframework.boot.SpringApplication 
- Application run failed
   org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'shenyuServerRegisterRepository' defined in class path resource 
[org/apache/shenyu/admin/config/RegisterCenterConfiguration.class]: Bean 
instantiation via factory method failed; nested exception is 
org.springframework.beans.BeanInstantiationException: Failed to instantiate 
[org.apache.shenyu.register.server.api.ShenyuServerRegisterRepository]: Factory 
method 'shenyuServerRegisterRepository' threw exception; nested exception is 
java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:636)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1338)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1177)
        at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:557)
        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:222)
        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.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:879)
        at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:878)
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:550)
        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:397)
        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 
org.apache.shenyu.admin.ShenyuAdminBootstrap.main(ShenyuAdminBootstrap.java:36)
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to 
instantiate 
[org.apache.shenyu.register.server.api.ShenyuServerRegisterRepository]: Factory 
method 'shenyuServerRegisterRepository' threw exception; nested exception is 
java.lang.NullPointerException
        at 
org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
        at 
org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:651)
        ... 19 common frames omitted
   Caused by: java.lang.NullPointerException: null
        at 
org.apache.shenyu.register.server.zookeeper.ZookeeperServerRegisterRepository.lambda$watcherMetadata$4(ZookeeperServerRegisterRepository.java:110)
        at java.util.ArrayList.forEach(ArrayList.java:1255)
        at 
org.apache.shenyu.register.server.zookeeper.ZookeeperServerRegisterRepository.watcherMetadata(ZookeeperServerRegisterRepository.java:108)
        at 
org.apache.shenyu.register.server.zookeeper.ZookeeperServerRegisterRepository.subscribeMetaData(ZookeeperServerRegisterRepository.java:93)
        at 
org.apache.shenyu.register.server.zookeeper.ZookeeperServerRegisterRepository.lambda$initSubscribe$0(ZookeeperServerRegisterRepository.java:70)
        at java.util.Arrays$ArrayList.forEach(Arrays.java:3880)
        at 
org.apache.shenyu.register.server.zookeeper.ZookeeperServerRegisterRepository.initSubscribe(ZookeeperServerRegisterRepository.java:70)
        at 
org.apache.shenyu.register.server.zookeeper.ZookeeperServerRegisterRepository.init(ZookeeperServerRegisterRepository.java:61)
        at 
org.apache.shenyu.admin.config.RegisterCenterConfiguration.shenyuServerRegisterRepository(RegisterCenterConfiguration.java:64)
        at 
org.apache.shenyu.admin.config.RegisterCenterConfiguration$$EnhancerBySpringCGLIB$$8c192b4d.CGLIB$shenyuServerRegisterRepository$1(<generated>)
        at 
org.apache.shenyu.admin.config.RegisterCenterConfiguration$$EnhancerBySpringCGLIB$$8c192b4d$$FastClassBySpringCGLIB$$5c24c75d.invoke(<generated>)
        at 
org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
        at 
org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:363)
        at 
org.apache.shenyu.admin.config.RegisterCenterConfiguration$$EnhancerBySpringCGLIB$$8c192b4d.shenyuServerRegisterRepository(<generated>)
        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.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
        ... 20 common frames omitted
   
   
   <details>
   <summary>Click to expand</summary>
   
   ```
   replace this line with your debug logs
   ```
   </details>
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to