johnny2002 opened a new issue #7123:
URL: https://github.com/apache/shardingsphere/issues/7123


   ## Bug Report
   
   
   ### Which version of ShardingSphere did you use?
   4.1.1
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   JDBC
   ### Sharding-sphere version: 4.0.1
   ### Probleam:
   We need to support load balance and failover throw jdbc driver, so our jdbc 
url contains 2 ip and ports, the url works in JDBC, while sharding-sphere 
throws exception.
   ### our url sample: 
    jdbc:postgresql://ip1:5432,ip2:5432/postgres?loadBalanceHosts=true
   ### the exception says:
   Caused by: org.apache.shardingsphere.core.exception.ShardingException: The 
URL of JDBC is not supported. Please refer to this pattern: 
jdbc:postgresql://([\w\-\.]+):?([0-9]*)/([\w\-]+).
        at 
org.apache.shardingsphere.core.metadata.datasource.dialect.PostgreSQLDataSourceMetaData.<init>(PostgreSQLDataSourceMetaData.java:53)
 ~[sharding-core-common-4.0.0-RC1.jar:4.0.0-RC1]
        at 
org.apache.shardingsphere.core.metadata.datasource.DataSourceMetaDataFactory.newInstance(DataSourceMetaDataFactory.java:53)
 ~[sharding-core-common-4.0.0-RC1.jar:4.0.0-RC1]
        at 
org.apache.shardingsphere.core.metadata.datasource.ShardingDataSourceMetaData.getDataSourceMetaDataMapForSharding(ShardingDataSourceMetaData.java:52)
 ~[sharding-core-common-4.0.0-RC1.jar:4.0.0-RC1]
   
   
   


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