thswlsqls opened a new issue, #39148:
URL: https://github.com/apache/shardingsphere/issues/39148

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   master @ cb50781bc2a
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   JDBC (example generator)
   
   ### Expected behavior
   Generating a JDBC example with `mode: cluster-etcd` should produce a 
runnable project whose `pom.xml` includes the etcd cluster-mode repository 
provider (`shardingsphere-cluster-mode-repository-etcd`).
   
   ### Actual behavior
   The generated `pom.xml` omits any repository provider for `cluster-etcd`. 
The `cluster-etcd` mode config emits `repository: type: etcd`, but no provider 
artifact is on the classpath, so the generated example fails at runtime with 
`ServiceProviderNotFoundException`.
   
   ### Reason analyze (If you can)
   `template/pom.ftl` 
(examples/shardingsphere-jdbc-example-generator/src/main/resources) has a `<#if 
mode=="cluster-zookeeper">` block adding 
`shardingsphere-cluster-mode-repository-zookeeper`, but no mirrored block for 
`cluster-etcd`. `cluster-etcd` is a supported mode 
(`YamlExampleConfigurationSupportedValue.MODES`, `config.yaml`, and 
`template/resources/yaml/mode/cluster-etcd.ftl`). The provider module 
`shardingsphere-cluster-mode-repository-etcd` already exists at 
`mode/type/cluster/repository/provider/etcd`.
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   Set `modes: cluster-etcd` in 
`examples/shardingsphere-jdbc-example-generator/src/main/resources/config.yaml`,
 run the generator, then run the generated example: startup fails because the 
etcd repository provider is not found.
   
   ### Example codes for reproduce this issue (such as a github link).
   N/A
   
   


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