TeslaCN commented on issue #19607:
URL: 
https://github.com/apache/shardingsphere/issues/19607#issuecomment-1198889062

   I've reproduced this issue.
   
   ```
   [INFO ] 2022-07-29 13:15:56,294 --main-- 
[com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource] Initializing c3p0 
pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, 
acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> 
false, automaticTestTable -> null, breakAfterAcquireFailure -> false, 
checkoutTimeout -> 0, connectionCustomizerClassName -> null, 
connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, 
contextClassLoaderSource -> caller, dataSourceName -> 
z8kfsxaqk30d5911hdcsh|47d9a273, debugUnreturnedConnectionStackTraces -> false, 
description -> null, driverClass -> null, extensions -> {}, 
factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, 
forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, 
identityToken -> z8kfsxaqk30d5911hdcsh|47d9a273, idleConnectionTestPeriod -> 0, 
initialPoolSize -> 3, jdbcUrl -> 
jdbc:mysql://localhost:3306/demo_ds_1?serverTimezone=UTC&useSSL=false
 &useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true, 
maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, 
maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, 
maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, 
preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> 
{password=******, user=******}, propertyCycle -> 0, 
statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, 
testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, 
userOverrides -> {}, usesTraditionalReflectiveProxies -> false ] 
   [INFO ] 2022-07-29 13:15:56,319 --main-- 
[com.mchange.v2.c3p0.impl.AbstractPoolBackedDataSource] Initializing c3p0 
pool... com.mchange.v2.c3p0.ComboPooledDataSource [ acquireIncrement -> 3, 
acquireRetryAttempts -> 30, acquireRetryDelay -> 1000, autoCommitOnClose -> 
false, automaticTestTable -> null, breakAfterAcquireFailure -> false, 
checkoutTimeout -> 0, connectionCustomizerClassName -> null, 
connectionTesterClassName -> com.mchange.v2.c3p0.impl.DefaultConnectionTester, 
contextClassLoaderSource -> caller, dataSourceName -> 
z8kfsxaqk30d5911hdcsh|68dc098b, debugUnreturnedConnectionStackTraces -> false, 
description -> null, driverClass -> null, extensions -> {}, 
factoryClassLocation -> null, forceIgnoreUnresolvedTransactions -> false, 
forceSynchronousCheckins -> false, forceUseNamedDriverClass -> false, 
identityToken -> z8kfsxaqk30d5911hdcsh|68dc098b, idleConnectionTestPeriod -> 0, 
initialPoolSize -> 3, jdbcUrl -> 
jdbc:mysql://localhost:3306/demo_ds_0?serverTimezone=UTC&useSSL=false
 &useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=true, 
maxAdministrativeTaskTime -> 0, maxConnectionAge -> 0, maxIdleTime -> 0, 
maxIdleTimeExcessConnections -> 0, maxPoolSize -> 15, maxStatements -> 0, 
maxStatementsPerConnection -> 0, minPoolSize -> 3, numHelperThreads -> 3, 
preferredTestQuery -> null, privilegeSpawnedThreads -> false, properties -> 
{password=******, user=******}, propertyCycle -> 0, 
statementCacheNumDeferredCloseThreads -> 0, testConnectionOnCheckin -> false, 
testConnectionOnCheckout -> false, unreturnedConnectionTimeout -> 0, 
userOverrides -> {}, usesTraditionalReflectiveProxies -> false ] 
   Exception in thread "main" java.lang.NullPointerException: Cannot invoke 
"Object.toString()" because the return value of "java.util.Map.get(Object)" is 
null
        at 
org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResource.createDataSourceMetaDataMap(ShardingSphereResource.java:63)
        at 
org.apache.shardingsphere.infra.metadata.database.resource.ShardingSphereResource.<init>(ShardingSphereResource.java:52)
        at 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase.createResource(ShardingSphereDatabase.java:115)
        at 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase.create(ShardingSphereDatabase.java:109)
        at 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabase.create(ShardingSphereDatabase.java:91)
        at 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabasesFactory.createGenericDatabases(ShardingSphereDatabasesFactory.java:80)
        at 
org.apache.shardingsphere.infra.metadata.database.ShardingSphereDatabasesFactory.create(ShardingSphereDatabasesFactory.java:68)
        at 
org.apache.shardingsphere.mode.metadata.MetaDataContextsFactory.create(MetaDataContextsFactory.java:66)
        at 
org.apache.shardingsphere.mode.manager.standalone.StandaloneContextManagerBuilder.build(StandaloneContextManagerBuilder.java:51)
        at 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:74)
        at 
org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.<init>(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:62)
        at 
org.apache.shardingsphere.example.sharding.raw.jdbc.factory.YamlDataSourceFactory.newInstance(YamlDataSourceFactory.java:33)
        at 
org.apache.shardingsphere.example.sharding.raw.jdbc.ShardingRawYamlConfigurationExample.main(ShardingRawYamlConfigurationExample.java:41)
   ```


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