iamif3000 opened a new issue #8695:
URL: https://github.com/apache/shardingsphere/issues/8695


   Hi,
   
   I'm using sharding-jdbc4.1.1.
   I followed the steps of 
https://shardingsphere.apache.org/document/legacy/4.x/document/en/manual/sharding-jdbc/usage/orchestration/
   
![image](https://user-images.githubusercontent.com/16129632/102712135-96400500-42f9-11eb-8608-4f797fa436cb.png)
   
   But I got an exception
   ```
   Exception in thread "main" Cannot create property=orchestration for 
JavaBean=org.apache.shardingsphere.shardingjdbc.orchestration.internal.yaml.YamlOrchestrationShardingRuleConfiguration@5c3bd550
    in 'reader', line 58, column 1:
       orchestration:
       ^
   No single argument constructor found for class 
org.apache.shardingsphere.orchestration.center.yaml.config.YamlCenterRepositoryConfiguration
 : null
    in 'reader', line 59, column 3:
         name: or_name
         ^
   
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:292)
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:171)
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructYamlObject.construct(Constructor.java:331)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:230)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:219)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructDocument(BaseConstructor.java:173)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.getSingleData(BaseConstructor.java:157)
        at org.yaml.snakeyaml.Yaml.loadFromReader(Yaml.java:472)
        at org.yaml.snakeyaml.Yaml.loadAs(Yaml.java:438)
        at 
org.apache.shardingsphere.underlying.common.yaml.engine.YamlEngine.unmarshal(YamlEngine.java:74)
        at 
org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationShardingDataSourceFactory.unmarshal(YamlOrchestrationShardingDataSourceFactory.java:115)
        at 
org.apache.shardingsphere.shardingjdbc.orchestration.api.yaml.YamlOrchestrationShardingDataSourceFactory.createDataSource(YamlOrchestrationShardingDataSourceFactory.java:58)
        at org.example.TestMain.main(TestMain.java:76)
   Caused by: org.yaml.snakeyaml.error.YAMLException: No single argument 
constructor found for class 
org.apache.shardingsphere.orchestration.center.yaml.config.YamlCenterRepositoryConfiguration
 : null
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructScalar.construct(Constructor.java:393)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:230)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:219)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping2ndStep(BaseConstructor.java:479)
        at 
org.yaml.snakeyaml.constructor.SafeConstructor.constructMapping2ndStep(SafeConstructor.java:190)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructMapping(BaseConstructor.java:460)
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.construct(Constructor.java:158)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructObjectNoCheck(BaseConstructor.java:230)
        at 
org.yaml.snakeyaml.constructor.BaseConstructor.constructObject(BaseConstructor.java:219)
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.newInstance(Constructor.java:305)
        at 
org.yaml.snakeyaml.constructor.Constructor$ConstructMapping.constructJavaBean2ndStep(Constructor.java:268)
   
   ```
   
   My configuration is
   ```
   orchestration:
     name: or_name
     overwrite: false
     registry:
       type: zookeeper
       serverLists: localhost:2181
       namespace: test_ns
   ```
   
   What's wrong ? Thanks


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

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


Reply via email to