You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/11/11 08:04:34 UTC

[GitHub] [dubbo-spi-extensions] wxbty opened a new issue, #166: NPE encountered when using dubbo-cluster-specify-address-dubbo3

wxbty opened a new issue, #166:
URL: https://github.com/apache/dubbo-spi-extensions/issues/166

   Environment
   Dubbo version: 3.0.7
   zookeeper version: 3.8.0
   
   The provider and consumer demo use the  project of 
   https://github.com/apache/dubbo-samples/tree/master/dubbo-samples-spring-boot
   
   
   
   ```java
   @SpringBootApplication
   @EnableDubbo
   public class ProviderApplication {
       public static void main(String[] args) {
   
           SpringApplication.run(ProviderApplication.class, args);
           System.out.println("dubbo service started");
       }
   }
   ```
   
   
   
   ```java
   @SpringBootApplication
   @Service
   @EnableDubbo
   public class ConsumerApplication {
   
       @DubboReference
       private DemoService demoService;
   
       public static void main(String[] args) {
   
           ConfigurableApplicationContext context = SpringApplication.run(ConsumerApplication.class, args);
           ConsumerApplication application = context.getBean(ConsumerApplication.class);
           UserSpecifiedAddressUtil.setAddress(new Address("127.0.0.1", 20882, true));
           String result = application.doSayHello("world");
           System.out.println("result: " + result);
       }
   
       public String doSayHello(String name) {
           return demoService.sayHello(name);
       }
   }
   ```
   
   
   
   The error is as follows:
   
   
   
   ```java
   [11/11/22 15:44:43:071 CST] main ERROR integration.DynamicDirectory:  [DUBBO] Failed to execute router: zookeeper://127.0.0.1:2181/org.apache.dubbo.registry.RegistryService?REGISTRY_CLUSTER=zk-registry&application=dubbo-springboot-demo-consumer&dubbo=2.0.2&pid=8509&qos.enable=false&release=3.0.7&timestamp=1668152545557, cause: null, dubbo version: 3.0.7, current host: 10.201.107.120
   java.lang.NullPointerException
   	at org.apache.dubbo.common.URL.setHost(URL.java:423)
   	at org.apache.dubbo.rpc.cluster.specifyaddress.DefaultUserSpecifiedServiceAddressBuilder.buildAddress(DefaultUserSpecifiedServiceAddressBuilder.java:52)
   	at org.apache.dubbo.rpc.cluster.specifyaddress.UserSpecifiedAddressRouter.createInvoker(UserSpecifiedAddressRouter.java:230)
   	at org.apache.dubbo.rpc.cluster.specifyaddress.UserSpecifiedAddressRouter.doRoute(UserSpecifiedAddressRouter.java:123)
   	at org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter.route(AbstractStateRouter.java:124)
   	at org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter.continueRoute(AbstractStateRouter.java:163)
   	at org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter.route(AbstractStateRouter.java:121)
   	at org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter.continueRoute(AbstractStateRouter.java:163)
   	at org.apache.dubbo.rpc.cluster.router.state.AbstractStateRouter.route(AbstractStateRouter.java:121)
   	at org.apache.dubbo.rpc.cluster.RouterChain.simpleRoute(RouterChain.java:178)
   ```
   
   
   
   
   
   
   
   
   


-- 
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: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-spi-extensions] wxbty commented on issue #166: NPE encountered when using dubbo-cluster-specify-address-dubbo3

Posted by GitBox <gi...@apache.org>.
wxbty commented on issue #166:
URL: https://github.com/apache/dubbo-spi-extensions/issues/166#issuecomment-1311363953

   /assign


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org


[GitHub] [dubbo-spi-extensions] wxbty closed issue #166: NPE encountered when using dubbo-cluster-specify-address-dubbo3

Posted by GitBox <gi...@apache.org>.
wxbty closed issue #166: NPE encountered when using dubbo-cluster-specify-address-dubbo3
URL: https://github.com/apache/dubbo-spi-extensions/issues/166


-- 
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: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org
For additional commands, e-mail: notifications-help@dubbo.apache.org