zhaoyunxing92 opened a new issue, #10419:
URL: https://github.com/apache/dubbo/issues/10419

   <!-- If you need to report a security issue please visit 
https://github.com/apache/dubbo/security/policy -->
   
   - [x] I have searched the [issues](https://github.com/apache/dubbo/issues) 
of this repository and believe that this is not a duplicate.
   
   ### Environment
   
   * Dubbo version: 3.0.10
   * Operating System version: mac
   * Java version: 1.8
   
   ### Steps to reproduce this issue
   
   1.xml文件
   ```xml
   <?xml version="1.0" encoding="UTF-8"?>
   <project xmlns="http://maven.apache.org/POM/4.0.0"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
            xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
https://maven.apache.org/xsd/maven-4.0.0.xsd";>
       <modelVersion>4.0.0</modelVersion>
       <parent>
           <groupId>org.springframework.boot</groupId>
           <artifactId>spring-boot-starter-parent</artifactId>
           <version>2.7.2</version>
           <relativePath/>
       </parent>
   
       <groupId>org.apache.dubbo</groupId>
       <artifactId>dubbo-sample</artifactId>
       <version>0.0.1-SNAPSHOT</version>
       <name>dubbo-sample</name>
   
       <description>dubbo-sample</description>
   
       <properties>
           <java.version>1.8</java.version>
           <dubbo.version>3.0.10</dubbo.version>
           <guava.version>31.1-jre</guava.version>
       </properties>
   
       <dependencies>
           <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter</artifactId>
           </dependency>
   
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-spring-boot-starter</artifactId>
               <version>${dubbo.version}</version>
           </dependency>
   
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-registry-nacos</artifactId>
               <version>${dubbo.version}</version>
           </dependency>
   
           <dependency>
               <groupId>org.apache.dubbo</groupId>
               <artifactId>dubbo-registry-zookeeper</artifactId>
               <version>${dubbo.version}</version>
           </dependency>
   
           <dependency>
               <groupId>org.springframework.boot</groupId>
               <artifactId>spring-boot-starter-test</artifactId>
               <scope>test</scope>
           </dependency>
       </dependencies>
   
       <build>
           <plugins>
               <plugin>
                   <groupId>org.springframework.boot</groupId>
                   <artifactId>spring-boot-maven-plugin</artifactId>
               </plugin>
           </plugins>
       </build>
   
   </project>
   
   ```
   2. yaml文件
   ```yaml
   dubbo:
     application:
       name: dubbo-sample
       register-mode: all
     scan:
       base-packages: org.apache.dubbo.sample.service
     protocol:
       name: dubbo
       port: -1
     provider:
       registry-ids: hangzhou,shanghai
     registries:
       hangzhou:
         address: nacos://localhost:8848
         parameters:
           namespace: hangzhou
       shanghai:
         address: nacos://localhost:8848
         parameters:
           namespace: shanghai
   ```
   
   Pls. provide [GitHub address] to reproduce this issue.
   
   ### Expected Behavior
   
   <!-- What do you expect from the above steps?-->
   
   希望可以注册到两个命名空间下
   
   ### Actual Behavior
   
   <!-- What actually happens? -->
   
   If there is an exception, please attach the exception trace:
   3. 遇到的异常
   ```log
   
   java.lang.IllegalStateException: Registry not found: shanghai
        at 
org.apache.dubbo.config.AbstractInterfaceConfig.lambda$convertRegistryIdsToRegistries$5(AbstractInterfaceConfig.java:488)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948) 
~[na:1.8.0_301]
        at 
java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580) 
~[na:1.8.0_301]
        at 
org.apache.dubbo.config.AbstractInterfaceConfig.convertRegistryIdsToRegistries(AbstractInterfaceConfig.java:482)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.AbstractInterfaceConfig.checkRegistry(AbstractInterfaceConfig.java:259)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.ServiceConfig.checkAndUpdateSubConfigs(ServiceConfig.java:286)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.ServiceConfig.postProcessRefresh(ServiceConfig.java:348)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.AbstractConfig.refresh(AbstractConfig.java:698) 
~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServiceInternal(DefaultModuleDeployer.java:316)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.deploy.DefaultModuleDeployer.exportServices(DefaultModuleDeployer.java:309)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.deploy.DefaultModuleDeployer.start(DefaultModuleDeployer.java:145)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onContextRefreshedEvent(DubboDeployApplicationListener.java:111)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:100)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.apache.dubbo.config.spring.context.DubboDeployApplicationListener.onApplicationEvent(DubboDeployApplicationListener.java:45)
 ~[dubbo-3.0.10.jar:3.0.10]
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586)
 ~[spring-context-5.3.22.jar:5.3.22]
        at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734) 
[spring-boot-2.7.2.jar:2.7.2]
        at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:408)
 [spring-boot-2.7.2.jar:2.7.2]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:308) 
[spring-boot-2.7.2.jar:2.7.2]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) 
[spring-boot-2.7.2.jar:2.7.2]
        at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1295) 
[spring-boot-2.7.2.jar:2.7.2]
        at 
org.apache.dubbo.sample.DubboSampleApplication.main(DubboSampleApplication.java:10)
 [classes/:na]
   ```
   


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to