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/12/16 02:47:41 UTC

[GitHub] [dubbo] guohao opened a new issue, #11159: [3.1] Configurations cannot be loaded correctly unless set in `SystemProperty`

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

   <!-- 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: branch 3.1
   * Operating System version: any
   * Java version: any
   
   ### Steps to reproduce this issue
   
   1. Set sysetm env `export a="b"`
   2. Edit file `dubbo-demo/dubbo-demo-api/dubbo-demo-api-provider/src/main/java/org/apache/dubbo/demo/provider/Application.java` 
   ```java
   package org.apache.dubbo.demo.provider;
   
   import org.apache.dubbo.common.config.ConfigurationUtils;
   import org.apache.dubbo.common.utils.Assert;
   import org.apache.dubbo.config.ApplicationConfig;
   import org.apache.dubbo.config.MetadataReportConfig;
   import org.apache.dubbo.config.RegistryConfig;
   import org.apache.dubbo.config.ServiceConfig;
   import org.apache.dubbo.demo.DemoService;
   
   public class Application {
       public static void main(String[] args) throws Exception {
           startWithExport();
       }
   
       private static void startWithExport() throws InterruptedException {
           ServiceConfig<DemoServiceImpl> service = new ServiceConfig<>();
           service.setInterface(DemoService.class);
           service.setRef(new DemoServiceImpl());
           service.setApplication(new ApplicationConfig("dubbo-demo-api-provider"));
           service.setRegistry(new RegistryConfig("zookeeper://127.0.0.1:2181"));
           service.setMetadataReportConfig(new MetadataReportConfig("zookeeper://127.0.0.1:2181"));
           service.export();
   
           String val = ConfigurationUtils.getProperty(service.getScopeModel(), "a", "c");
           Assert.assertTrue("b".equals(val), "bad value");
       }
   }
   ```
   
   4. Run it
   
   ### Expected Behavior
   
   "b" 
   ### Actual Behavior
   
   "c"
   
   
   This BUG is very **SERIOUS**  and could lead to production problems.


-- 
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] AlbumenJ commented on issue #11159: [3.1] Configurations cannot be loaded correctly unless set in `SystemProperty`

Posted by GitBox <gi...@apache.org>.
AlbumenJ commented on issue #11159:
URL: https://github.com/apache/dubbo/issues/11159#issuecomment-1354203933

   integration test cases: https://github.com/apache/dubbo-samples/pull/630


-- 
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] AlbumenJ closed issue #11159: [3.1] Configurations cannot be loaded correctly unless set in `SystemProperty`

Posted by GitBox <gi...@apache.org>.
AlbumenJ closed issue #11159: [3.1] Configurations cannot be loaded correctly unless set in `SystemProperty`
URL: https://github.com/apache/dubbo/issues/11159


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