Closed lyh061619 closed 2 years ago
Ali Druid JDBC connection pool. Look at POM Tomcat DBCP jar package test dependency. Shouldn't formal release be unnecessary
Ali Druid JDBC connection pool. Look at POM Tomcat DBCP jar package test dependency. Shouldn't formal release be unnecessary
@lyh061619 Thank you for your feedback , i will see it. And Can you provider a demo?
Ali Druid JDBC connection pool. Look at POM Tomcat DBCP jar package test dependency. Shouldn't formal release be unnecessary
@lyh061619 Thank you for your feedback , i will see it. And Can you provider a demo? of course jfinal_demo_for_maven.zip
Thx
Thx
Remove the Tomcat DBCP dependency from the local test POM. Note that MVN compiler jdk 1.8+
Thx
Remove the Tomcat DBCP dependency from the local test POM. Note that MVN compiler jdk 1.8+
I download it and check it. The ShardingSphere
not supprot mariadb
now, When i change to mysql
it 's work well.
Thx
Remove the Tomcat DBCP dependency from the local test POM. Note that MVN compiler jdk 1.8+
I download it and check it. The
ShardingSphere
not supprotmariadb
now, When i change tomysql
it 's work well.
I use MariaDB and POM to add Tomcat DBCP jar, which is also normal
Thx
Remove the Tomcat DBCP dependency from the local test POM. Note that MVN compiler jdk 1.8+
I download it and check it. The
ShardingSphere
not supprotmariadb
now, When i change tomysql
it 's work well.I use MariaDB and POM to add Tomcat DBCP jar, which is also normal
I suggest change to mysql
database if you use ShardingSphere
.
I see. There is no such problem when testing version 5.0.0. This problem will occur when testing version 5.1.0
I see. There is no such problem when testing version 5.0.0. This problem will occur when testing version 5.1.0
Yeah, Let me double check it.
I see. There is no such problem when testing version 5.0.0. This problem will occur when testing version 5.1.0
Yeah, Let me double check it.
Yes, the MariaDB I use uses Mysql to drive the connection URL: JDBC: MySQL. There is no problem with the connection test
This problem should not be the problem of data differences
So I think there is a bug in version 5.1.0
I see. There is no such problem when testing version 5.0.0. This problem will occur when testing version 5.1.0
Yeah, Let me double check it.
Yes, the MariaDB I use uses Mysql to drive the connection URL: JDBC: MySQL. There is no problem with the connection test
This problem should not be the problem of data differences
So I think there is a bug in version 5.1.0
refer to #15507
Thx
Remove the Tomcat DBCP dependency from the local test POM. Note that MVN compiler jdk 1.8+
I have to wonder if this step can be carried out. Because in the metadata SPI implementation of ShardingSphere
5.1.0, the corresponding classes for the related JDBC Pools are called directly. If it is reflect
by the class name, this in turn affects the packaging of GraalVM
, requiring the addition of new hints.
What do you think?
Bug Report
For English only, other languages will not accept.
Before report a bug, make sure you have:
Please pay attention on issues you submitted, because we maybe need more details. If no response anymore and we cannot reproduce it on current information, we will close it.
Please answer these questions before submitting your issue. Thanks!
Which version of ShardingSphere did you use?
5.1.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Actual behavior
Get data source
Reason analyze (If you can)
Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tomcat/dbcp/dbcp2/BasicDataSource at org.apache.shardingsphere.infra.datasource.pool.metadata.type.dbcp.TomcatDBCPDataSourcePoolMetaData.getType(TomcatDBCPDataSourcePoolMetaData.java:67) at org.apache.shardingsphere.spi.typed.TypedSPIRegistry.lambda$findRegisteredService$0(TypedSPIRegistry.java:44) at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1602) at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150) at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:647) at org.apache.shardingsphere.spi.typed.TypedSPIRegistry.findRegisteredService(TypedSPIRegistry.java:44) at org.apache.shardingsphere.infra.datasource.pool.metadata.DataSourcePoolMetaDataFactory.newInstance(DataSourcePoolMetaDataFactory.java:46) at org.apache.shardingsphere.infra.datasource.props.DataSourcePropertiesCreator.createProperties(DataSourcePropertiesCreator.java:81) at org.apache.shardingsphere.infra.datasource.props.DataSourcePropertiesCreator.create(DataSourcePropertiesCreator.java:57) at org.apache.shardingsphere.infra.metadata.resource.DataSourcesMetaData.(DataSourcesMetaData.java:41)
at org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData.createResource(ShardingSphereMetaData.java:73)
at org.apache.shardingsphere.infra.metadata.ShardingSphereMetaData.create(ShardingSphereMetaData.java:66)
at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.getMetaDataMap(MetaDataContextsBuilder.java:105)
at org.apache.shardingsphere.mode.metadata.MetaDataContextsBuilder.build(MetaDataContextsBuilder.java:96)
at org.apache.shardingsphere.mode.manager.memory.MemoryContextManagerBuilder.build(MemoryContextManagerBuilder.java:49)
at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:81)
at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.(ShardingSphereDataSource.java:64)
at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:77)
at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:92)
at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:151)
at com.demo.common.DemoConfig.configPlugin(DemoConfig.java:133)
at com.jfinal.core.Config.configPluginWithOrder(Config.java:70)
at com.jfinal.core.Config.configJFinal(Config.java:59)
at com.jfinal.core.JFinal.init(JFinal.java:61)
at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:64)
at io.undertow.servlet.core.LifecyleInterceptorInvocation.proceed(LifecyleInterceptorInvocation.java:111)
at io.undertow.servlet.core.ManagedFilter.createFilter(ManagedFilter.java:80)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:594)
at io.undertow.servlet.core.DeploymentManagerImpl$2.call(DeploymentManagerImpl.java:559)
at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42)
at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
at io.undertow.servlet.core.DeploymentManagerImpl.start(DeploymentManagerImpl.java:601)
at com.jfinal.server.undertow.UndertowServer.configHttp(UndertowServer.java:287)
at com.jfinal.server.undertow.UndertowServer.doStart(UndertowServer.java:265)
at com.jfinal.server.undertow.UndertowServer.start(UndertowServer.java:158)
at com.jfinal.server.undertow.UndertowServer.start(UndertowServer.java:83)
at com.demo.common.DemoConfig.main(DemoConfig.java:48)
Caused by: java.lang.ClassNotFoundException: org.apache.tomcat.dbcp.dbcp2.BasicDataSource
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
... 43 more
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
Example codes for reproduce this issue (such as a github link).
ShardingRuleConfiguration configuration =new ShardingRuleConfiguration();
}