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 2022/10/10 06:33:05 UTC

[GitHub] [shardingsphere] cuiyapu opened a new issue, #20074: Oracle batch insert error

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

   use version 5.1.2 
   batch insert SQL : 
   INSERT INTO T_USER( id, city, name, year) VALUES (?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?),(?,?,?,?)
   error info:
   {
       "timestamp": "2022-08-11T06:46:00.912+0000",
       "status": 500,
       "error": "Internal Server Error",
       "message": "\r\n### Error updating database.  Cause: java.sql.SQLException: 索引中丢失  IN 或 OUT 参数:: 3\r\n### The error may exist in file [D:\\workSpace_run\\Sharding-Demo6\\target\\classes\\com\\fangjia\\sharding\\dao\\mapping\\UserMapper.xml]\r\n### The error may involve defaultParameterMap\r\n### The error occurred while setting parameters\r\n### SQL: INSERT INTO t_user (city, year)       VALUES                  (?,          ?)       ,           (?,          ?)       ,           (?,          ?)       ,           (?,          ?)       ,           (?,          ?)       ,           (?,          ?)       ,           (?,          ?)       ,           (?,          ?)       ,           (?,          ?)\r\n### Cause: java.sql.SQLException: 索引中丢失  IN 或 OUT 参数:: 3\n; uncategorized SQLException; SQL state [99999]; error code [17041]; 索引中丢失  IN 或 OUT 参数:: 3; nested exception is java.sql.SQLException: 索引中丢失  IN 或 OUT 参数:: 3",
       "path": "/batchAdd"
   }
   one insert is ok ,  and mysql batch insert is ok . But oracle batch insert throw exception .
   
   config:
   spring:
     profiles: dev
     shardingsphere:
       props:
         sql:
           show: true
       #配置第 1 个数据源 
       datasource:
         names: ds-2021,ds-2022
         ds-2021:
           dataSourceClassName: com.zaxxer.hikari.HikariDataSource
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: oracle.jdbc.OracleDriver
           url: jdbc:oracle:thin:@192.168.31.198:1521:orcl
           username: process
           password: process
         # 配置第 2 个数据源 
         ds-2022:
           dataSourceClassName: com.zaxxer.hikari.HikariDataSource
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: oracle.jdbc.OracleDriver
           url: jdbc:oracle:thin:@192.168.31.198:1521:orcl
           username: process1
           password: process1
       # 配置分片规则和分片算法
       rules:
         # 配置分片规则
         sharding:
           tables:
             # 配置 t_order 表规则
             t_user:
               # 配置分库策略
               databaseStrategy:
                 standard:
                   shardingColumn: year
                   shardingAlgorithmName: dbstrategy
               tableStrategy:
                 none:
               keyGenerateStrategy:
                 column: id
                 keyGeneratorName: snowflake
           # 配置分片算法
           defaultDatabaseStrategy:
             standard:
               shardingColumn: year
               shardingAlgorithmName: dbstrategy
           defaultTableStrategy:
             none:
           shardingAlgorithms:
             dbstrategy:
               type: INLINE
               props:
                 algorithm-expression: ds-$->{year}
           keyGenerators:
             snowflake:
               type: SNOWFLAKE
               props:
                 workerId: 123


-- 
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] linghengqian commented on issue #20074: Oracle batch insert error

Posted by GitBox <gi...@apache.org>.
linghengqian commented on issue #20074:
URL: https://github.com/apache/shardingsphere/issues/20074#issuecomment-1213061234

   Duplicates with https://github.com/apache/shardingsphere/issues/17431, https://github.com/apache/shardingsphere/issues/15689 and https://github.com/apache/shardingsphere/issues/8107,  I recommend closing this issue to avoid diverting discussions.


-- 
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] RaigorJiang closed issue #20074: Oracle batch insert error

Posted by "RaigorJiang (via GitHub)" <gi...@apache.org>.
RaigorJiang closed issue #20074: Oracle batch insert error
URL: https://github.com/apache/shardingsphere/issues/20074


-- 
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] github-actions[bot] closed issue #20074: Oracle batch insert error

Posted by GitBox <gi...@apache.org>.
github-actions[bot] closed issue #20074: Oracle batch insert error
URL: https://github.com/apache/shardingsphere/issues/20074


-- 
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] github-actions[bot] commented on issue #20074: Oracle batch insert error

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #20074:
URL: https://github.com/apache/shardingsphere/issues/20074#issuecomment-1272348924

   Hello , this issue has not received a reply for several days.
   This issue is supposed to be closed.


-- 
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] RaigorJiang commented on issue #20074: Oracle batch insert error

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

   Duplicated with #15689


-- 
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