vansee opened a new issue #12936:
URL: https://github.com/apache/shardingsphere/issues/12936


   ## Bug Report
   
   Error querying database.  Cause: java.lang.IndexOutOfBoundsException: Index: 
0, Size: 0
   The error may exist in file 
[/Users/**/Workspace/Github/**/target/classes/mapper/system/SysConfigMapper.xml]
   The error may involve com.**.mapper.SysConfigMapper.selectConfigList
   The error occurred while handling results
   SQL: select config_id,                config_group,                
config_name,                config_key,                config_value,            
    config_type,                status_code,                del_flag,           
     created_by,                created_name,                created_time,      
          remark,                vor         from sys_config
   Cause: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at 
org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:149)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
        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.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
        ... 96 common frames omitted
   Caused by: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
        at java.util.ArrayList.rangeCheck(ArrayList.java:657)
        at java.util.ArrayList.get(ArrayList.java:433)
        at 
org.apache.shardingsphere.infra.merge.MergeEngine.merge(MergeEngine.java:78)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.mergeQuery(ShardingSpherePreparedStatement.java:379)
        at 
org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.getResultSet(ShardingSpherePreparedStatement.java:324)
        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.apache.ibatis.logging.jdbc.PreparedStatementLogger.invoke(PreparedStatementLogger.java:69)
        at com.sun.proxy.$Proxy245.getResultSet(Unknown Source)
        at 
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getFirstResultSet(DefaultResultSetHandler.java:237)
        at 
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:187)
        at 
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:65)
        at 
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:79)
        at 
org.apache.ibatis.executor.ReuseExecutor.doQuery(ReuseExecutor.java:60)
        at 
org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325)
        at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156)
        at 
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109)
        at 
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89)
        at 
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
        ... 102 common frames omitted
   
   Before report a bug, make sure you have:
   
   
![image](https://user-images.githubusercontent.com/8781610/136506148-7c1f1b89-6569-4f3a-92dc-d35c6b368791.png)
   
   
![image](https://user-images.githubusercontent.com/8781610/136507549-51dbc221-9042-490b-adf3-89816b5f7112.png)
   
   when insert/update/delete then SQLException can't been handle with 
SQLExecutorExceptionHandler.handleException(ex) and logger it.
   
   - Searched open and closed [GitHub 
issues](https://github.com/apache/shardingsphere/issues).
   - Read documentation: [ShardingSphere 
Doc](https://shardingsphere.apache.org/document/current/en/overview).
   
   Please pay attention on issues you submitted, because we maybe need more 
details. 
   If no response anymore and we cannot reproduce it on current information, we 
will **close it**.
   
   Please answer these questions before submitting your issue. Thanks!
   
   ### Which version of ShardingSphere did you use?
   5.0.0-beta or 5.0.0-alpha
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   ### Expected behavior
   Throw SQLException
   
   ### Actual behavior
   No SQLException was thrown
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule 
configuration, when exception occur etc.
   
   ### Example codes for reproduce this issue (such as a github link).
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to