You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/03/03 17:50:03 UTC
[GitHub] [incubator-shardingsphere] juaihua opened a new issue #4585: nested
exception is java.lang.NoClassDefFoundError:
org/apache/curator/connection/ConnectionHandlingPolicy
juaihua opened a new issue #4585: nested exception is java.lang.NoClassDefFoundError: org/apache/curator/connection/ConnectionHandlingPolicy
URL: https://github.com/apache/incubator-shardingsphere/issues/4585
hi guys, i have met a problem when i integrate sharding-jdbc with orchestration implented by zk,
here is error info,
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'athena.platform.actuate.health.jdbc.DataSourceHealthIndicatorAutoConfiguration': Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [athena.platform.actuate.health.jdbc.DataSourceHealthIndicatorAutoConfiguration$$EnhancerBySpringCGLIB$$1a35b56d]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingDataSourceByLocal' defined in class path resource [org/apache/shardingsphere/shardingjdbc/orchestration/spring/boot/OrchestrationSpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSourceByLocal' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/curator/connection/ConnectionHandlingPolicy
and here is my properties:
# start sharding-sphere
spring.shardingsphere.enabled=true
spring.shardingsphere.datasource.names=ds0,ds1,ds2,ds3
spring.shardingsphere.datasource.ds0.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds0.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds0.url=jdbc:mysql://localhost:3306/rdb-shrd-01?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull&useSSL=false
spring.shardingsphere.datasource.ds0.username=root
spring.shardingsphere.datasource.ds0.password=root
spring.shardingsphere.datasource.ds1.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds1.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds1.url=jdbc:mysql://localhost:3306/rdb-shrd-02?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull&useSSL=false
spring.shardingsphere.datasource.ds1.username=root
spring.shardingsphere.datasource.ds1.password=root
spring.shardingsphere.datasource.ds2.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds2.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds2.url=jdbc:mysql://localhost:3307/rdb-shrd-03?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull&useSSL=false
spring.shardingsphere.datasource.ds2.username=root
spring.shardingsphere.datasource.ds2.password=root
spring.shardingsphere.datasource.ds3.type=com.alibaba.druid.pool.DruidDataSource
spring.shardingsphere.datasource.ds3.driver-class-name=com.mysql.jdbc.Driver
spring.shardingsphere.datasource.ds3.url=jdbc:mysql://localhost:3307/rdb-shrd-04?useUnicode=true&characterEncoding=gbk&zeroDateTimeBehavior=convertToNull&useSSL=false
spring.shardingsphere.datasource.ds3.username=root
spring.shardingsphere.datasource.ds3.password=root
spring.shardingsphere.sharding.tables.rc_user.actual-data-nodes=ds$->{0..3}.rc_user_0$->{0..1}
spring.shardingsphere.sharding.tables.rc_user.database-strategy.inline.sharding-column=id
spring.shardingsphere.sharding.tables.rc_user.database-strategy.inline.algorithm-expression=ds$->{id.toBigInteger().mod(new BigInteger("4"))}
spring.shardingsphere.sharding.tables.rc_user.table-strategy.inline.sharding-column=id
spring.shardingsphere.sharding.tables.rc_user.table-strategy.inline.algorithm-expression=rc_user_0$->{id.toBigInteger().mod(new BigInteger("2"))}
spring.shardingsphere.sharding.tables.rc_user.key-generator.column=id
spring.shardingsphere.sharding.tables.rc_user.key-generator.type=SNOWFLAKE
spring.shardingsphere.sharding.tables.rc_user_device.actual-data-nodes=ds$->{0..3}.rc_user_device_0$->{0..1}
spring.shardingsphere.sharding.tables.rc_user_device.database-strategy.inline.sharding-column=user_id
spring.shardingsphere.sharding.tables.rc_user_device.database-strategy.inline.algorithm-expression=ds$->{user_id.toBigInteger().mod(new BigInteger("4"))}
spring.shardingsphere.sharding.tables.rc_user_device.table-strategy.inline.sharding-column=user_id
spring.shardingsphere.sharding.tables.rc_user_device.table-strategy.inline.algorithm-expression=rc_user_device_0$->{user_id.toBigInteger().mod(new BigInteger("2"))}
spring.shardingsphere.sharding.tables.rc_user_device.key-generator.column=id
spring.shardingsphere.sharding.tables.rc_user_device.key-generator.type=SNOWFLAKE
#bind tables: if more, follow by as: .binding-tables[1]=, .binding-tables[1]
spring.shardingsphere.sharding.binding-tables[0]=rc_user,rc_user_device
#config tables
spring.shardingsphere.sharding.broadcast-tables[0]=rc_country
spring.shardingsphere.props.sql.show=true
#encrypt data.
spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.type=aes
spring.shardingsphere.sharding.encrypt-rule.encryptors.encryptor_aes.props.aes.key.value=123456
spring.shardingsphere.sharding.encrypt-rule.tables.rc_user.columns.language_id.plainColumn=language_id_pln
spring.shardingsphere.sharding.encrypt-rule.tables.rc_user.columns.language_id.cipherColumn=language_id_cip
spring.shardingsphere.sharding.encrypt-rule.tables.rc_user.columns.language_id.logicCloumn=language_id
spring.shardingsphere.sharding.encrypt-rule.tables.rc_user.columns.language_id.encryptor=encryptor_aes
spring.shardingsphere.props.query.with.cipher.column=true
spring.shardingsphere.orchestration.name=spring_boot_ds_sharding
spring.shardingsphere.orchestration.overwrite=true
spring.shardingsphere.orchestration.registry.type=zookeeper
spring.shardingsphere.orchestration.registry.namespace=orchestration-spring-boot-sharding-test
spring.shardingsphere.orchestration.registry.server-lists=localhost:2181
#spring.shardingsphere.sharding.default-database-strategy.inline.sharding-column=user_id
#spring.shardingsphere.sharding.default-database-strategy.inline.algorithm-expression=ds$->{user_id % 2}
and my pom.xml is like this:
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-orchestration-spring-boot-starter</artifactId>
<version>${sharding-sphere.version}</version>
</dependency>
<!--<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-orchestration-center-zookeeper-curator</artifactId>
<version>${sharding-sphere.version}</version>
</dependency>-->
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-orchestration-reg-zookeeper-curator</artifactId>
<version>${sharding-sphere.version}</version>
</dependency>
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu closed issue #4585: nested
exception is java.lang.NoClassDefFoundError:
org/apache/curator/connection/ConnectionHandlingPolicy
Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #4585: nested exception is java.lang.NoClassDefFoundError: org/apache/curator/connection/ConnectionHandlingPolicy
URL: https://github.com/apache/incubator-shardingsphere/issues/4585
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking edited a comment on issue
#4585: nested exception is java.lang.NoClassDefFoundError:
org/apache/curator/connection/ConnectionHandlingPolicy
Posted by GitBox <gi...@apache.org>.
kimmking edited a comment on issue #4585: nested exception is java.lang.NoClassDefFoundError: org/apache/curator/connection/ConnectionHandlingPolicy
URL: https://github.com/apache/incubator-shardingsphere/issues/4585#issuecomment-594422400
Which vesion do you refer?
And do you make `mvn clean package install at first?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] terrymanu commented on issue #4585:
nested exception is java.lang.NoClassDefFoundError:
org/apache/curator/connection/ConnectionHandlingPolicy
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #4585: nested exception is java.lang.NoClassDefFoundError: org/apache/curator/connection/ConnectionHandlingPolicy
URL: https://github.com/apache/incubator-shardingsphere/issues/4585#issuecomment-596180801
Maybe you can resolve the conflict of 3 party libraries by yourself.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
[GitHub] [incubator-shardingsphere] kimmking commented on issue #4585:
nested exception is java.lang.NoClassDefFoundError:
org/apache/curator/connection/ConnectionHandlingPolicy
Posted by GitBox <gi...@apache.org>.
kimmking commented on issue #4585: nested exception is java.lang.NoClassDefFoundError: org/apache/curator/connection/ConnectionHandlingPolicy
URL: https://github.com/apache/incubator-shardingsphere/issues/4585#issuecomment-594422400
Which vesion do you refer?
And do you make mvn clean package install at first?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services