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 2019/05/29 10:01:03 UTC
[GitHub] [incubator-shardingsphere] fwb7014 opened a new issue #2468: datasource name not same with actual name cause “invalid actual data node”
fwb7014 opened a new issue #2468: datasource name not same with actual name cause “invalid actual data node”
URL: https://github.com/apache/incubator-shardingsphere/issues/2468
## Question
The code and exception as fllow:
<bean id="dataSource_1" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/My_HULK_1?useUnicode=true&characterEncoding=utf8" />
<property XXXX />
</bean>
<bean id="dataSource_2" class="com.mchange.v2.c3p0.ComboPooledDataSource" destroy-method="close">
<property name="driverClass" value="com.mysql.jdbc.Driver" />
<property name="jdbcUrl" value="jdbc:mysql://127.0.0.1:3306/My_HULK_2?useUnicode=true&characterEncoding=utf8" />
<property XXXX/>
</bean>
<sharding:data-source id="shardingDataSource">
<sharding:sharding-rule data-source-names="dataSource_1,dataSource_2">
<sharding:table-rules>
<sharding:table-rule logic-table="t_payment_order" actual-data-nodes="My_HULK_$->{1..2}.t_payment_order_$->{['01','02','03','04','05','06','07','08','09','10','11','12']}"
database-strategy-ref="databaseStandardStrategy" table-strategy-ref="tableStandardStrategy"/>
</sharding:table-rules>
</sharding:sharding-rule>
<sharding:props>
<prop key="sql.show">true</prop>
</sharding:props>
</sharding:data-source>
Error msg:
Cannot find data source in sharding rule, invalid actual data node is: 'My_HULK_1.t_payment_order_01'
----------------------------------------------------------------
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