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/12/27 02:26:47 UTC
[GitHub] [incubator-shardingsphere] itxiaole opened a new issue #3814:
Sharding JDBC, errors caused by case, database oracle
itxiaole opened a new issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814
#Configuration information:
# shard column name # shard column name
spring.shardingsphere.sharding.tables.order_item.table-strategy.inline.sharding-column=order_id
#Line expressions for the sharding algorithm, with groovy syntax
spring.shardingsphere.sharding.tables.order_item.table-strategy.inline.algorithm-expression=order_item_$->{order_id % 2 + 1}
#The primary key id
spring.shardingsphere.sharding.tables.order_info.key-generator.column=order_id
#Primary key generation strategy snowflake algorithm
spring.shardingsphere.sharding.tables.order_info.key-generator.type=SNOWFLAKE
#oracle insert
@Insert("insert into order_info(ORDER_ID,ORDER_PRICE,ORDER_INVENTORY) VALUES (#{orderId},#{orderPrice},#{orderInventory})")
int insert(@Param("orderId")Long orderId, @Param("orderPrice") int orderPrice, @Param("orderInventory") int orderInventory);
#error message
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.NullPointerException: Cannot invoke method mod() on null object
### The error may exist in com/sharding/jdbc/jdbc/kuakuguanlianquery/TOrderInfoDao.java (best guess)
### The error may involve com.sharding.jdbc.jdbc.kuakuguanlianquery.TOrderInfoDao.insert-Inline
### The error occurred while setting parameters
### SQL: insert into order_info(ORDER_ID,ORDER_PRICE,ORDER_INVENTORY) VALUES (?,?,?)
### Cause: java.lang.NullPointerException: Cannot invoke method mod() on null object
#The solution
@Insert("insert into order_info(order_id,ORDER_PRICE,ORDER_INVENTORY) VALUES (#{orderId},#{orderPrice},#{orderInventory})")
int insert(@Param("orderId")Long orderId, @Param("orderPrice") int orderPrice, @Param("orderInventory") int orderInventory);
This problem is too pit!!
----------------------------------------------------------------
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] itxiaole commented on issue #3814:
Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
itxiaole commented on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569169681
<!-- https://mvnrepository.com/artifact/io.shardingjdbc/sharding-jdbc-core -->
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>sharding-jdbc-spring-boot-starter</artifactId>
<version>4.0.0-RC1</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] itxiaole commented on issue #3814:
Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
itxiaole commented on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569180738
@SteNicholas I cut to version 3 and got a direct error. I'll see what's wrong
error message:
2019-12-27 11:54:13.052 INFO 31084 --- [ main] o.a.s.core.util.ConfigurationLogger : Properties
{}
2019-12-27 11:54:13.454 WARN 31084 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingDataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSource' threw exception; nested exception is java.sql.SQLException: 无法转换为内部表示
2019-12-27 11:54:13.461 INFO 31084 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-12-27 11:54:13.470 ERROR 31084 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingDataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSource' threw exception; nested exception is java.sql.SQLException: 无法转换为内部表示
There is something wrong with version 3. Let me see if I have updated something
----------------------------------------------------------------
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] itxiaole commented on issue #3814:
Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
itxiaole commented on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569196018
@terrymanu I'm very sorry. I'll pay attention next time. My English is not very good and my translation is not very accurate
----------------------------------------------------------------
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 edited a comment on issue
#3814: Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
terrymanu edited a comment on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569191074
> This problem is too pit!!
@itxiaole Hi, we are just doing a open source project, can you remove your moody words?
Let's talk about how to improve the project, is it OK?
----------------------------------------------------------------
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 #3814:
Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569191074
> This problem is too pit!!
Hi, we are just doing a open source project, can you remove your moody words?
Let's talk about how to improve the project, is it OK?
----------------------------------------------------------------
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] itxiaole closed issue #3814: Sharding
JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
itxiaole closed issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814
----------------------------------------------------------------
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] itxiaole removed a comment on issue
#3814: Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
itxiaole removed a comment on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569180738
@SteNicholas I cut to version 3 and got a direct error. I'll see what's wrong
error message:
2019-12-27 11:54:13.052 INFO 31084 --- [ main] o.a.s.core.util.ConfigurationLogger : Properties
{}
2019-12-27 11:54:13.454 WARN 31084 --- [ main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingDataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSource' threw exception; nested exception is java.sql.SQLException: 无法转换为内部表示
2019-12-27 11:54:13.461 INFO 31084 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-12-27 11:54:13.470 ERROR 31084 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'shardingDataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'shardingDataSource' threw exception; nested exception is java.sql.SQLException: 无法转换为内部表示
There is something wrong with version 3. Let me see if I have updated something
----------------------------------------------------------------
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] SteNicholas commented on issue #3814:
Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
SteNicholas commented on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569170323
@itxiaole Could you please try 4.0.0-RC3 version?
----------------------------------------------------------------
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 #3814:
Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569191748
The title cannot summary your problem, can you change the title to make it for search friendly?
----------------------------------------------------------------
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 removed a comment on issue
#3814: Sharding JDBC, errors caused by case, database oracle
Posted by GitBox <gi...@apache.org>.
terrymanu removed a comment on issue #3814: Sharding JDBC, errors caused by case, database oracle
URL: https://github.com/apache/incubator-shardingsphere/issues/3814#issuecomment-569191074
> This problem is too pit!!
@itxiaole Hi, we are just doing a open source project, can you remove your moody words?
Let's talk about how to improve the project, is it OK?
----------------------------------------------------------------
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