<h2 dir="auto">Bug Report</h2>
<h3 dir="auto">Which version of ShardingSphere did you use?</h3>
<p dir="auto">master <a class="commit-link" data-hovercard-type="commit" data-hovercard-url="https://github.com/apache/shardingsphere/commit/6cf1f1e8352d7be5c501a5626ef44e708a5b0d2b/hovercard" href="https://github.com/apache/shardingsphere/commit/6cf1f1e8352d7be5c501a5626ef44e708a5b0d2b"><tt>6cf1f1e</tt></a></p>
<h3 dir="auto">Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?</h3>
<p dir="auto">ShardingSphere-Proxy</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto"><code class="notranslate">CREATE READWRITE_SPLITTING RULE</code> failed.</p>
<h3 dir="auto">Actual behavior</h3>
<p dir="auto">Got an exception but <code class="notranslate">CREATE READWRITE_SPLITTING RULE</code> success.</p>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.</h3>
<ol dir="auto">
<li>Create <code class="notranslate">ms_group_0</code>, use <code class="notranslate">resource_0</code></li>
</ol>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CREATE READWRITE_SPLITTING RULE ms_group_0 (
WRITE_RESOURCE=resource_0,
READ_RESOURCES(resource_1),TYPE(NAME=random)
);"><pre class="notranslate">CREATE READWRITE_SPLITTING RULE ms_group_0 (
WRITE_RESOURCE<span class="pl-k">=</span>resource_0,
READ_RESOURCES(resource_1),TYPE(NAME<span class="pl-k">=</span>random)
);</pre></div>
<ol start="2" dir="auto">
<li>Create <code class="notranslate">ms_group_1</code>, use <code class="notranslate">resource_0</code> too</li>
</ol>
<div class="highlight highlight-source-sql notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="CREATE READWRITE_SPLITTING RULE ms_group_1` (
WRITE_RESOURCE=resource_0,
READ_RESOURCES(resource_1),TYPE(NAME=random)
);"><pre class="notranslate">CREATE READWRITE_SPLITTING RULE ms_group_1<span class="pl-s"><span class="pl-pds">`</span> (</span>
<span class="pl-s">WRITE_RESOURCE=resource_0,</span>
<span class="pl-s">READ_RESOURCES(resource_1),TYPE(NAME=random)</span>
<span class="pl-s">);</span></pre></div>
<h3 dir="auto">log</h3>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="ERROR 1999 (42000): Unknown exception: Can not config duplicate write data source `resource_0` in database `test1`."><pre class="notranslate"><code class="notranslate">ERROR 1999 (42000): Unknown exception: Can not config duplicate write data source `resource_0` in database `test1`.
</code></pre></div>
<p dir="auto">But when I execute <code class="notranslate">show readwrite_splitting rules</code>, <code class="notranslate">ms_group_1</code> exists.</p>
<p dir="auto">For English only, other languages we will close it directly.</p>
<p dir="auto">Please answer these questions before submitting your issue. Thanks!</p>
<p dir="auto">Before submit a new issue, please check existed issue first, to make sure your issue is not a duplicated one.</p>
<h3 dir="auto">Which version of Sharding-Sphere do you using?</h3>
<p dir="auto">3.0.0.M3</p>
<h3 dir="auto">Which project do you using? Sharding-JDBC or Sharding-Proxy?</h3>
<p dir="auto">Sharding-JDBC</p>
<h3 dir="auto">Expected behavior</h3>
<p dir="auto">my use orchestraion regcenter configuration sharding<br>
but thorw ShardingConfigurationException: No available data source configuration to load<br>
my debugger find this problem is YAML.load(dataSourceMapYamlString) throw exception<br>
the dataSourceMapYamlString is not null</p>
<p dir="auto">can you help my see the problem, thank you!</p>
<p dir="auto">sharding configuration:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;import resource=&quot;classpath:/applicationContext-sharding-reg-center.xml&quot;/&gt;
&lt;orchestraion:sharding-data-source id=&quot;shardingDatabasesTablesDataSource&quot; registry-center-ref=&quot;regCenter&quot; /&gt;"><pre class="notranslate">&lt;<span class="pl-ent">import</span> <span class="pl-e">resource</span>=<span class="pl-s"><span class="pl-pds">"</span>classpath:/applicationContext-sharding-reg-center.xml<span class="pl-pds">"</span></span>/&gt;
&lt;<span class="pl-ent">orchestraion</span><span class="pl-ent">:</span><span class="pl-ent">sharding-data-source</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>shardingDatabasesTablesDataSource<span class="pl-pds">"</span></span> <span class="pl-e">registry-center-ref</span>=<span class="pl-s"><span class="pl-pds">"</span>regCenter<span class="pl-pds">"</span></span> /&gt;</pre></div>
<p dir="auto">applicationContext-sharding-reg-center.xml:</p>
<div class="highlight highlight-text-xml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="&lt;orchestration:zookeeper id=&quot;regCenter&quot; server-lists=&quot;172.28.1.60:2181&quot; namespace=&quot;rdb-orche&quot; base-sleep-time-milliseconds=&quot;1000&quot; max-sleep-time-milliseconds=&quot;3000&quot; max-retries=&quot;3&quot; /&gt;"><pre class="notranslate">&lt;<span class="pl-ent">orchestration</span><span class="pl-ent">:</span><span class="pl-ent">zookeeper</span> <span class="pl-e">id</span>=<span class="pl-s"><span class="pl-pds">"</span>regCenter<span class="pl-pds">"</span></span> <span class="pl-e">server-lists</span>=<span class="pl-s"><span class="pl-pds">"</span>172.28.1.60:2181<span class="pl-pds">"</span></span> <span class="pl-e">namespace</span>=<span class="pl-s"><span class="pl-pds">"</span>rdb-orche<span class="pl-pds">"</span></span> <span class="pl-e">base-sleep-time-milliseconds</span>=<span class="pl-s"><span class="pl-pds">"</span>1000<span class="pl-pds">"</span></span> <span class="pl-e">max-sleep-time-milliseconds</span>=<span class="pl-s"><span class="pl-pds">"</span>3000<span class="pl-pds">"</span></span> <span class="pl-e">max-retries</span>=<span class="pl-s"><span class="pl-pds">"</span>3<span class="pl-pds">"</span></span> /&gt;</pre></div>
<p dir="auto">see my zookeeper datasource string is:</p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dataSource: !!com.jolbox.bonecp.BoneCPDataSource
  acquireIncrement: 5
  acquireRetryAttempts: 5
  acquireRetryDelayInMs: 7000
  closeConnectionWatchTimeout: 0
  closeConnectionWatchTimeoutInMs: 0
  configFile:
  connectionHookClassName:
  connectionTestStatement:
  connectionTimeout: 0
  connectionTimeoutInMs: 0
  defaultAutoCommit: true
  defaultCatalog:
  defaultReadOnly: false
  defaultTransactionIsolation:
  driverClass: com.mysql.jdbc.Driver
  idleConnectionTestPeriod: 60
  idleConnectionTestPeriodInMinutes: 60
  idleMaxAge: 240
  idleMaxAgeInMinutes: 240
  initSQL:
  jdbcUrl: jdbc:mysql://localhost:3306/dayi_spot?characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull
  maxConnectionAge: 0
  maxConnectionAgeInSeconds: 0
  maxConnectionsPerPartition: 10
  minConnectionsPerPartition: 5
  partitionCount: 3
  password: '123456'
  poolAvailabilityThreshold: 0
  poolName:
  poolStrategy: DEFAULT
  preparedStatementsCacheSize: 100
  queryExecuteTimeLimitInMs: 0
  releaseHelperThreads: 0
  serviceOrder: FIFO
  statementCacheSize: 100
  statementReleaseHelperThreads: 0
  statementsCacheSize: 100
  statementsCachedPerConnection: 0
  user: root
  username: root
ds-2016: !!com.jolbox.bonecp.BoneCPDataSource
  acquireIncrement: 5
  acquireRetryAttempts: 5
  acquireRetryDelayInMs: 7000
  closeConnectionWatchTimeout: 0
  closeConnectionWatchTimeoutInMs: 0
  configFile:
  connectionHookClassName:
  connectionTestStatement:
  connectionTimeout: 0
  connectionTimeoutInMs: 0
  defaultAutoCommit: true
  defaultCatalog:
  defaultReadOnly: false
  defaultTransactionIsolation:
  driverClass: com.mysql.jdbc.Driver
  idleConnectionTestPeriod: 60
  idleConnectionTestPeriodInMinutes: 60
  idleMaxAge: 240
  idleMaxAgeInMinutes: 240
  initSQL:
  jdbcUrl: jdbc:mysql://localhost:3306/dayi_spot_2016?characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull
  maxConnectionAge: 0
  maxConnectionAgeInSeconds: 0
  maxConnectionsPerPartition: 10
  minConnectionsPerPartition: 5
  partitionCount: 3
  password: '123456'
  poolAvailabilityThreshold: 0
  poolName:
  poolStrategy: DEFAULT
  preparedStatementsCacheSize: 100
  queryExecuteTimeLimitInMs: 0
  releaseHelperThreads: 0
  serviceOrder: FIFO
  statementCacheSize: 100
  statementReleaseHelperThreads: 0
  statementsCacheSize: 100
  statementsCachedPerConnection: 0
  user: root
  username: root
ds-2017: !!com.jolbox.bonecp.BoneCPDataSource
  acquireIncrement: 5
  acquireRetryAttempts: 5
  acquireRetryDelayInMs: 7000
  closeConnectionWatchTimeout: 0
  closeConnectionWatchTimeoutInMs: 0
  configFile:
  connectionHookClassName:
  connectionTestStatement:
  connectionTimeout: 0
  connectionTimeoutInMs: 0
  defaultAutoCommit: true
  defaultCatalog:
  defaultReadOnly: false
  defaultTransactionIsolation:
  driverClass: com.mysql.jdbc.Driver
  idleConnectionTestPeriod: 60
  idleConnectionTestPeriodInMinutes: 60
  idleMaxAge: 240
  idleMaxAgeInMinutes: 240
  initSQL:
  jdbcUrl: jdbc:mysql://localhost:3306/dayi_spot_2017?characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull
  maxConnectionAge: 0
  maxConnectionAgeInSeconds: 0
  maxConnectionsPerPartition: 10
  minConnectionsPerPartition: 5
  partitionCount: 3
  password: '123456'
  poolAvailabilityThreshold: 0
  poolName:
  poolStrategy: DEFAULT
  preparedStatementsCacheSize: 100
  queryExecuteTimeLimitInMs: 0
  releaseHelperThreads: 0
  serviceOrder: FIFO
  statementCacheSize: 100
  statementReleaseHelperThreads: 0
  statementsCacheSize: 100
  statementsCachedPerConnection: 0
  user: root
  username: root"><pre class="notranslate"><span class="pl-ent">dataSource</span>: <span class="pl-s">!!com.jolbox.bonecp.BoneCPDataSource</span>
  <span class="pl-ent">acquireIncrement</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">acquireRetryAttempts</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">acquireRetryDelayInMs</span>: <span class="pl-c1">7000</span>
  <span class="pl-ent">closeConnectionWatchTimeout</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">closeConnectionWatchTimeoutInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">configFile</span>:
  <span class="pl-ent">connectionHookClassName</span>:
  <span class="pl-ent">connectionTestStatement</span>:
  <span class="pl-ent">connectionTimeout</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">connectionTimeoutInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">defaultCatalog</span>:
  <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultTransactionIsolation</span>:
  <span class="pl-ent">driverClass</span>: <span class="pl-s">com.mysql.jdbc.Driver</span>
  <span class="pl-ent">idleConnectionTestPeriod</span>: <span class="pl-c1">60</span>
  <span class="pl-ent">idleConnectionTestPeriodInMinutes</span>: <span class="pl-c1">60</span>
  <span class="pl-ent">idleMaxAge</span>: <span class="pl-c1">240</span>
  <span class="pl-ent">idleMaxAgeInMinutes</span>: <span class="pl-c1">240</span>
  <span class="pl-ent">initSQL</span>:
  <span class="pl-ent">jdbcUrl</span>: <span class="pl-s">jdbc:mysql://localhost:3306/dayi_spot?characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull</span>
  <span class="pl-ent">maxConnectionAge</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">maxConnectionAgeInSeconds</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">maxConnectionsPerPartition</span>: <span class="pl-c1">10</span>
  <span class="pl-ent">minConnectionsPerPartition</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">partitionCount</span>: <span class="pl-c1">3</span>
  <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span>123456<span class="pl-pds">'</span></span>
  <span class="pl-ent">poolAvailabilityThreshold</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">poolName</span>:
  <span class="pl-ent">poolStrategy</span>: <span class="pl-s">DEFAULT</span>
  <span class="pl-ent">preparedStatementsCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">queryExecuteTimeLimitInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">releaseHelperThreads</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">serviceOrder</span>: <span class="pl-s">FIFO</span>
  <span class="pl-ent">statementCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">statementReleaseHelperThreads</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">statementsCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">statementsCachedPerConnection</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">user</span>: <span class="pl-s">root</span>
  <span class="pl-ent">username</span>: <span class="pl-s">root</span>
<span class="pl-ent">ds-2016</span>: <span class="pl-s">!!com.jolbox.bonecp.BoneCPDataSource</span>
  <span class="pl-ent">acquireIncrement</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">acquireRetryAttempts</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">acquireRetryDelayInMs</span>: <span class="pl-c1">7000</span>
  <span class="pl-ent">closeConnectionWatchTimeout</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">closeConnectionWatchTimeoutInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">configFile</span>:
  <span class="pl-ent">connectionHookClassName</span>:
  <span class="pl-ent">connectionTestStatement</span>:
  <span class="pl-ent">connectionTimeout</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">connectionTimeoutInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">defaultCatalog</span>:
  <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultTransactionIsolation</span>:
  <span class="pl-ent">driverClass</span>: <span class="pl-s">com.mysql.jdbc.Driver</span>
  <span class="pl-ent">idleConnectionTestPeriod</span>: <span class="pl-c1">60</span>
  <span class="pl-ent">idleConnectionTestPeriodInMinutes</span>: <span class="pl-c1">60</span>
  <span class="pl-ent">idleMaxAge</span>: <span class="pl-c1">240</span>
  <span class="pl-ent">idleMaxAgeInMinutes</span>: <span class="pl-c1">240</span>
  <span class="pl-ent">initSQL</span>:
  <span class="pl-ent">jdbcUrl</span>: <span class="pl-s">jdbc:mysql://localhost:3306/dayi_spot_2016?characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull</span>
  <span class="pl-ent">maxConnectionAge</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">maxConnectionAgeInSeconds</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">maxConnectionsPerPartition</span>: <span class="pl-c1">10</span>
  <span class="pl-ent">minConnectionsPerPartition</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">partitionCount</span>: <span class="pl-c1">3</span>
  <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span>123456<span class="pl-pds">'</span></span>
  <span class="pl-ent">poolAvailabilityThreshold</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">poolName</span>:
  <span class="pl-ent">poolStrategy</span>: <span class="pl-s">DEFAULT</span>
  <span class="pl-ent">preparedStatementsCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">queryExecuteTimeLimitInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">releaseHelperThreads</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">serviceOrder</span>: <span class="pl-s">FIFO</span>
  <span class="pl-ent">statementCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">statementReleaseHelperThreads</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">statementsCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">statementsCachedPerConnection</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">user</span>: <span class="pl-s">root</span>
  <span class="pl-ent">username</span>: <span class="pl-s">root</span>
<span class="pl-ent">ds-2017</span>: <span class="pl-s">!!com.jolbox.bonecp.BoneCPDataSource</span>
  <span class="pl-ent">acquireIncrement</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">acquireRetryAttempts</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">acquireRetryDelayInMs</span>: <span class="pl-c1">7000</span>
  <span class="pl-ent">closeConnectionWatchTimeout</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">closeConnectionWatchTimeoutInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">configFile</span>:
  <span class="pl-ent">connectionHookClassName</span>:
  <span class="pl-ent">connectionTestStatement</span>:
  <span class="pl-ent">connectionTimeout</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">connectionTimeoutInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">defaultAutoCommit</span>: <span class="pl-c1">true</span>
  <span class="pl-ent">defaultCatalog</span>:
  <span class="pl-ent">defaultReadOnly</span>: <span class="pl-c1">false</span>
  <span class="pl-ent">defaultTransactionIsolation</span>:
  <span class="pl-ent">driverClass</span>: <span class="pl-s">com.mysql.jdbc.Driver</span>
  <span class="pl-ent">idleConnectionTestPeriod</span>: <span class="pl-c1">60</span>
  <span class="pl-ent">idleConnectionTestPeriodInMinutes</span>: <span class="pl-c1">60</span>
  <span class="pl-ent">idleMaxAge</span>: <span class="pl-c1">240</span>
  <span class="pl-ent">idleMaxAgeInMinutes</span>: <span class="pl-c1">240</span>
  <span class="pl-ent">initSQL</span>:
  <span class="pl-ent">jdbcUrl</span>: <span class="pl-s">jdbc:mysql://localhost:3306/dayi_spot_2017?characterEncoding=utf-8&amp;zeroDateTimeBehavior=convertToNull</span>
  <span class="pl-ent">maxConnectionAge</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">maxConnectionAgeInSeconds</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">maxConnectionsPerPartition</span>: <span class="pl-c1">10</span>
  <span class="pl-ent">minConnectionsPerPartition</span>: <span class="pl-c1">5</span>
  <span class="pl-ent">partitionCount</span>: <span class="pl-c1">3</span>
  <span class="pl-ent">password</span>: <span class="pl-s"><span class="pl-pds">'</span>123456<span class="pl-pds">'</span></span>
  <span class="pl-ent">poolAvailabilityThreshold</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">poolName</span>:
  <span class="pl-ent">poolStrategy</span>: <span class="pl-s">DEFAULT</span>
  <span class="pl-ent">preparedStatementsCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">queryExecuteTimeLimitInMs</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">releaseHelperThreads</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">serviceOrder</span>: <span class="pl-s">FIFO</span>
  <span class="pl-ent">statementCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">statementReleaseHelperThreads</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">statementsCacheSize</span>: <span class="pl-c1">100</span>
  <span class="pl-ent">statementsCachedPerConnection</span>: <span class="pl-c1">0</span>
  <span class="pl-ent">user</span>: <span class="pl-s">root</span>
  <span class="pl-ent">username</span>: <span class="pl-s">root</span></pre></div>
<h3 dir="auto">Actual behavior</h3>
<h3 dir="auto">Reason analyze</h3>
<h3 dir="auto">Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc</h3>
<h3 dir="auto">For bug report, please <em>MUST</em> provide the reproduce example codes (such as a github link).</h3>