You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "ymwfish (via GitHub)" <gi...@apache.org> on 2023/08/15 02:35:36 UTC
[GitHub] [shardingsphere] ymwfish opened a new issue, #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
ymwfish opened a new issue, #28084:
URL: https://github.com/apache/shardingsphere/issues/28084
sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
JDBC Connection [HikariProxyConnection@1848393149 wrapping org.apache.shardingsphere.driver.jdbc.core.connection.ShardingSphereConnection@6c7cfaa0] will not be managed by Spring
==> Preparing: INSERT INTO t_user ( user_id, user_name, user_name_plain, pwd, assisted_query_pwd ) VALUES ( ?, ?, ?, ?, ? )
==> Parameters: 1691274278381072386(Long), zhangsan(String), plain(String), 123(String), 456(String)
Closing non transactional SqlSession [org.apache.ibatis.session.defaults.DefaultSqlSession@7886a7a2]
2023-08-15T10:23:18.868+08:00 ERROR 14260 --- [nio-8081-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.jdbc.BadSqlGrammarException:
### Error updating database. Cause: java.sql.SQLException: Table 't_user' doesn't exist
### The error may exist in com/wna/springboot3/sharding/mapper/UserMapper.java (best guess)
### The error may involve com.wna.springboot3.sharding.mapper.UserMapper.insert-Inline
### The error occurred while setting parameters
### SQL: INSERT INTO t_user ( user_id, user_name, user_name_plain, pwd, assisted_query_pwd ) VALUES ( ?, ?, ?, ?, ? )
### Cause: java.sql.SQLException: Table 't_user' doesn't exist
; bad SQL grammar []] with root cause
java.sql.SQLException: Table 't_user' doesn't exist
at org.apache.shardingsphere.dialect.mysql.mapper.MySQLDialectExceptionMapper.toSQLException(MySQLDialectExceptionMapper.java:120) ~[shardingsphere-mysql-dialect-exception-5.4.0.jar:5.4.0]
at org.apache.shardingsphere.dialect.mysql.mapper.MySQLDialectExceptionMapper.convert(MySQLDialectExceptionMapper.java:72) ~[shardingsphere-mysql-dialect-exception-5.4.0.jar:5.4.0]
at org.apache.shardingsphere.dialect.SQLExceptionTransformEngine.toSQLException(SQLExceptionTransformEngine.java:59) ~[shardingsphere-dialect-exception-core-5.4.0.jar:5.4.0]
at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:416) ~[shardingsphere-jdbc-core-5.4.0.jar:5.4.0]
at com.zaxxer.hikari.pool.ProxyPreparedStatement.execute(ProxyPreparedStatement.java:44) ~[HikariCP-5.0.1.jar:na]
--
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] ymwfish closed issue #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
Posted by "ymwfish (via GitHub)" <gi...@apache.org>.
ymwfish closed issue #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
URL: https://github.com/apache/shardingsphere/issues/28084
--
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] ymwfish commented on issue #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
Posted by "ymwfish (via GitHub)" <gi...@apache.org>.
ymwfish commented on issue #28084:
URL: https://github.com/apache/shardingsphere/issues/28084#issuecomment-1678681223
Refers to the only table that exists in all sharded data sources. Suitable for tables with a small amount of data and do not need to be sharded
--
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] ymwfish commented on issue #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
Posted by "ymwfish (via GitHub)" <gi...@apache.org>.
ymwfish commented on issue #28084:
URL: https://github.com/apache/shardingsphere/issues/28084#issuecomment-1678510708
Thank you for your reply, I also tried it really worked, but there was a problem when I was configuring
-! SINGLE tables: - "ds0.*" is valid, but if the value is set to -! SINGLE tables: - "ds1.*" Again, the table cannot be found. ds0 and ds1 actually have the same table
--
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] ymwfish commented on issue #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
Posted by "ymwfish (via GitHub)" <gi...@apache.org>.
ymwfish commented on issue #28084:
URL: https://github.com/apache/shardingsphere/issues/28084#issuecomment-1678347928
springboot配置:
spring:
datasource:
driver-class-name: org.apache.shardingsphere.driver.ShardingSphereDriver
url: jdbc:shardingsphere:classpath:shading-auto-tables-algorithm.yaml
--
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] zhaojinchao95 commented on issue #28084: sharding-jdbc5.4 without the default-data-source-name option, tables without configuration rules will report an exception that the table cannot be found
Posted by "zhaojinchao95 (via GitHub)" <gi...@apache.org>.
zhaojinchao95 commented on issue #28084:
URL: https://github.com/apache/shardingsphere/issues/28084#issuecomment-1678474052
Maybe you need to set single table confiuration, please refer to: https://shardingsphere.apache.org/document/current/en/user-manual/shardingsphere-jdbc/yaml-config/rules/single/
--
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