shardingsphere: v5.2, If a druid datasource has some filters, then create a ShardingSphereDataSource will occur exception
Bug Report
Which version of ShardingSphere did you use?
v5.2.0
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
- Create a druid datasource, and then add some filters.
DruidDataSource druidDataSource = new DruidDataSource();
// ...
druidDataSource.setProxyFilters(buildFilters());
- Create a shardingsphere datasource by ShardingSphereDataSourceFactory
- Exception occurs: Can’t construct a java object for tag:yaml.org,2002:com.alibaba.druid.filter.stat.StatFilter; exception=Class is not accepted: com.alibaba.druid.filter.stat.StatFilter.
Example codes for reproduce this issue (such as a github link).
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Reactions: 1
- Comments: 17 (8 by maintainers)
Thank you for replying. The same code run in 5.1.2 is OK. Only when upgrading to 5.2.0 will cause this error.