lefthand250 opened a new issue, #25226:
URL: https://github.com/apache/shardingsphere/issues/25226
Hi, I have some question about ShardingSphere-JDBC
this is my dependency
```
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core</artifactId>
<version>5.3.0</version>
</dependency>
<!-- DataSource pool -->
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.1.23</version>
</dependency>
<!-- Overriding spring-start-web managed version 1.17 for snakeyaml-->
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>1.33</version>
</dependency>
```
Here is my application.yml
```
spring:
application:
name: hos-inventory
datasource:
driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
url: jdbc:shardingsphere:classpath:datasource.yml
```
Here is my datasources
```
databaseName: ds_1
mode:
type: Standalone
repository:
type: JDBC
dataSources:
ds_1:
dataSourceClassName: com.alibaba.druid.pool.DruidDataSource
username: ywt
password: welcome1
url: jdbc:mysql://192.168.1.110:3306/ywt159
```
Here is the logs.
Caused by: java.lang.RuntimeException: Failed to get driver instance for
jdbcUrl=jdbc:h2:mem:config;DB_CLOSE_DELAY=-1;DATABASE_TO_UPPER=false;MODE=MYSQL
at com.zaxxer.hikari.util.DriverDataSource.(DriverDataSource.java:88)
at com.zaxxer.hikari.pool.PoolBase.initializeDataSource(PoolBase.java:318)
at com.zaxxer.hikari.pool.PoolBase.(PoolBase.java:108)
at com.zaxxer.hikari.pool.HikariPool.(HikariPool.java:99)
at com.zaxxer.hikari.HikariDataSource.getConnection(HikariDataSource.java:94)
at
org.apache.shardingsphere.mode.repository.standalone.jdbc.JDBCRepository.init(JDBCRepository.java:67)
at
org.apache.shardingsphere.infra.util.spi.type.required.RequiredSPIRegistry.getRegisteredService(RequiredSPIRegistry.java:45)
at
org.apache.shardingsphere.mode.repository.standalone.StandalonePersistRepositoryFactory.getInstance(StandalonePersistRepositoryFactory.java:44)
at
org.apache.shardingsphere.mode.manager.standalone.StandaloneContextManagerBuilder.build(StandaloneContextManagerBuilder.java:44)
at
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:76)
at
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.(ShardingSphereDataSource.java:64)
at
org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:93)
at
org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:133)
at
org.apache.shardingsphere.driver.api.yaml.YamlShardingSphereDataSourceFactory.createDataSource(YamlShardingSphereDataSourceFactory.java:75)
at
org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.createDataSource(DriverDataSourceCache.java:51)
at
java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
at
org.apache.shardingsphere.driver.jdbc.core.driver.DriverDataSourceCache.get(DriverDataSourceCache.java:45)
at
org.apache.shardingsphere.driver.ShardingSphereDriver.connect(ShardingSphereDriver.java:51)
at
org.apache.tomcat.jdbc.pool.PooledConnection.connectUsingDriver(PooledConnection.java:319)
... 76 more
Caused by: java.sql.SQLException: No suitable driver
at java.sql.DriverManager.getDriver(DriverManager.java:315)
at com.zaxxer.hikari.util.DriverDataSource.(DriverDataSource.java:81)
It seems datasources doesn't work
I don't know where is wrong.
Can you please help me figure it out. I would be really grateful.
--
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]