You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Cyoking (via GitHub)" <gi...@apache.org> on 2023/04/25 10:09:09 UTC

[GitHub] [shardingsphere] Cyoking opened a new issue, #25324: Configure multiple different types of data sources, and the project starts to report an error

Cyoking opened a new issue, #25324:
URL: https://github.com/apache/shardingsphere/issues/25324

   ## Question
   Configure multiple different types of data sources, and the project starts to report an error
   
   ![image](https://user-images.githubusercontent.com/41101749/234244818-accf820c-5510-4b5f-a005-0805210a4833.png)
   The following is my sub-table rule
   ```yaml
         tables:
             inbound_shipment_item_list_mws:
               actual-data-nodes: pg$->{0..0}.inbound_shipment_item_list_mws_$->{0..20}
   ```
   
   ```java
   Caused by: java.lang.IllegalStateException: Database type inconsistent with 'org.apache.shardingsphere.infra.database.type.dialect.MySQLDatabaseType@19ea65f4' and 'org.apache.shardingsphere.infra.database.type.dialect.PostgreSQLDatabaseType@3dfe2797'
   	at com.google.common.base.Preconditions.checkState(Preconditions.java:824)
   	at org.apache.shardingsphere.infra.database.type.DatabaseTypeRecognizer.getDatabaseType(DatabaseTypeRecognizer.java:45)
   	at org.apache.shardingsphere.infra.database.type.DatabaseTypeFactory.getDatabaseType(DatabaseTypeFactory.java:52)
   	at org.apache.shardingsphere.mode.manager.memory.MemoryContextManagerBuilder.build(MemoryContextManagerBuilder.java:53)
   	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.createContextManager(ShardingSphereDataSource.java:81)
   	at org.apache.shardingsphere.driver.jdbc.core.datasource.ShardingSphereDataSource.<init>(ShardingSphereDataSource.java:64)
   	at org.apache.shardingsphere.driver.api.ShardingSphereDataSourceFactory.createDataSource(ShardingSphereDataSourceFactory.java:77)
   	at com.asinking.cloud.base.sharding.datasource.AkShardingJdbcConfiguration.shardingSphereDataSource(AkShardingJdbcConfiguration.java:98)
   	at com.asinking.cloud.base.sharding.datasource.AkShardingJdbcConfiguration$$EnhancerBySpringCGLIB$$ade96091.CGLIB$shardingSphereDataSource$3(<generated>)
   	at com.asinking.cloud.base.sharding.datasource.AkShardingJdbcConfiguration$$EnhancerBySpringCGLIB$$ade96091$$FastClassBySpringCGLIB$$2e145605.invoke(<generated>)
   	at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:244)
   	at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
   	at com.asinking.cloud.base.sharding.datasource.AkShardingJdbcConfiguration$$EnhancerBySpringCGLIB$$ade96091.shardingSphereDataSource(<generated>)
   	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
   	... 149 more
   
   
   ```
   When I remove the data configuration of mysql or postgresql, the project can start normally, and the table can be divided correctly
   


-- 
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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] Cyoking commented on issue #25324: Configure multiple different types of data sources, and the project starts to report an error

Posted by "Cyoking (via GitHub)" <gi...@apache.org>.
Cyoking commented on issue #25324:
URL: https://github.com/apache/shardingsphere/issues/25324#issuecomment-1524960003

   > 
   
   5.1.0


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Configure multiple different types of data sources, and the project starts to report an error [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu commented on issue #25324:
URL: https://github.com/apache/shardingsphere/issues/25324#issuecomment-2231098486

   Only same database type can be supported in sharding


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [shardingsphere] strongduanmu commented on issue #25324: Configure multiple different types of data sources, and the project starts to report an error

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu commented on issue #25324:
URL: https://github.com/apache/shardingsphere/issues/25324#issuecomment-1524560477

   @Cyoking Which version did you use?


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Configure multiple different types of data sources, and the project starts to report an error [shardingsphere]

Posted by "terrymanu (via GitHub)" <gi...@apache.org>.
terrymanu closed issue #25324: Configure multiple different types of data sources, and the project starts to report an error
URL: https://github.com/apache/shardingsphere/issues/25324


-- 
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: notifications-unsubscribe@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org