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/05/24 08:00:11 UTC

[GitHub] [shardingsphere] Orangehalf opened a new issue, #17903: Column index out of range

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

   ## Bug Report
   
   **For English only**, other languages will not accept.
   
   Before report a bug, make sure you have:
   
   - 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?
   ##  
          <dependency>
                   <groupId>org.apache.shardingsphere</groupId>
                   <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
                   <version>5.1.1</version>
         </dependency>
   ##  
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ## 
         ShardingSphere-JDBC 
   ##
   ### Expected behavior
   ##
        No errors, no exceptions
   ##
   ### Actual behavior
   ##
         Caused by: java.sql.SQLException: Column index out of range.
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1094)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:997)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:983)
   	at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:928)
   	at com.mysql.jdbc.ResultSetMetaData.getField(ResultSetMetaData.java:407)
   	at com.mysql.jdbc.ResultSetMetaData.getColumnLabel(ResultSetMetaData.java:239)
   	at org.apache.shardingsphere.driver.jdbc.core.resultset.ShardingSphereResultSetMetaData.getColumnLabel(ShardingSphereResultSetMetaData.java:106)
   	at org.apache.ibatis.executor.resultset.ResultSetWrapper.<init>(ResultSetWrapper.java:60)
   	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getFirstResultSet(DefaultResultSetHandler.java:251)
   	at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:188)
   	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.SimpleExecutor.doQuery(SimpleExecutor.java:63)
   	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 sun.reflect.GeneratedMethodAccessor154.invoke(Unknown Source)
   	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
   	at java.lang.reflect.Method.invoke(Method.java:498)
   	at org.apache.ibatis.plugin.Invocation.proceed(Invocation.java:49)
   	at com.github.pagehelper.SqlUtil.doProcessPage(SqlUtil.java:499)
   	at com.github.pagehelper.SqlUtil._processPage(SqlUtil.java:407)
   	at com.github.pagehelper.SqlUtil.processPage(SqlUtil.java:374)
   	at com.github.pagehelper.PageHelper.intercept(PageHelper.java:255)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
   	at com.sun.proxy.$Proxy260.query(Unknown Source)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145)
   	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
   	at sun.reflect.GeneratedMethodAccessor424.invoke(Unknown Source)
   	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)
   	... 66 common frames omitted
   ##
   
   ### Reason analyze (If you can)
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   ##
        CREATE TABLE `fenceset` (
         `id` bigint(20) NOT NULL AUTO_INCREMENT,
         `companyId` int(11) DEFAULT '0',
         `createDate` datetime DEFAULT NULL,
         `deleted` bit(1) DEFAULT b'0',
         `owner` varchar(255) DEFAULT NULL,
         `remark` varchar(255) DEFAULT NULL,
         `enableTime` tinyint(1) NOT NULL,
         `endTime` varchar(255) DEFAULT NULL,
         `fenceId` bigint(20) NOT NULL,
         `inAlarmSpeed` int(11) NOT NULL,
         `inAlarmWarn` varchar(255) DEFAULT NULL,
         `inFenceAlarm` tinyint(1) NOT NULL,
         `inFenceLimit` tinyint(1) NOT NULL,
         `inFenceWarn` tinyint(1) NOT NULL,
         `inOverTime` int(11) NOT NULL,
         `inWarn` varchar(255) DEFAULT NULL,
         `inWarnSpeed` int(11) NOT NULL,
         `inWarnWarn` varchar(255) DEFAULT NULL,
         `name` varchar(255) DEFAULT NULL,
         `outAlarmSpeed` int(11) NOT NULL,
         `outAlarmWarn` varchar(255) DEFAULT NULL,
         `outFenceAlarm` tinyint(1) NOT NULL,
         `outFenceLimit` tinyint(1) NOT NULL,
         `outFenceWarn` tinyint(1) NOT NULL,
         `outOverTime` int(11) NOT NULL,
         `outWarn` varchar(255) DEFAULT NULL,
         `outWarnSpeed` int(11) NOT NULL,
         `outWarnWarn` varchar(255) DEFAULT NULL,
         `startTime` varchar(255) DEFAULT NULL,
         `share` tinyint(1) NOT NULL,
         `type` int(11) NOT NULL,
         `mountainProhibited` tinyint(1) NOT NULL,
         `sendType` tinyint(1) DEFAULT '0' COMMENT '',
         `station` tinyint(1) DEFAULT '0' COMMENT '',
         `setProperty` varchar(255) DEFAULT NULL COMMENT '',
         `startDate` datetime DEFAULT NULL COMMENT '',
         `endDate` datetime DEFAULT NULL COMMENT '',
         `maxSpeed` int(10) DEFAULT NULL COMMENT '',
         `duration` int(10) DEFAULT NULL COMMENT '',
         `maxDrivingTimeLimit` int(10) DEFAULT '0' COMMENT '',
         `minDrivingTimeLimit` int(10) DEFAULT '0' COMMENT '',
         `areaExt` varchar(10) DEFAULT NULL COMMENT '',
         `openDoorFlag` tinyint(1) DEFAULT NULL COMMENT '',
         `openComMode` tinyint(1) DEFAULT NULL COMMENT '',
         `collectGpsInfo` tinyint(1) DEFAULT NULL COMMENT '',
         PRIMARY KEY (`id`) USING BTREE,
         UNIQUE KEY `id` (`id`) USING BTREE,
         KEY `fenceId` (`fenceId`) USING BTREE
       ) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
   
       CREATE TABLE `vehiclefencebind` (
         `id` bigint(20) NOT NULL AUTO_INCREMENT,
         `companyId` int(11) DEFAULT '0',
         `createDate` datetime DEFAULT NULL,
         `deleted` bit(1) DEFAULT b'0',
         `owner` varchar(255) DEFAULT NULL,
         `remark` varchar(255) DEFAULT NULL,
         `refId` bigint(20) NOT NULL,
         `vehicleId` bigint(20) NOT NULL,
         PRIMARY KEY (`id`) USING BTREE,
         UNIQUE KEY `id` (`id`) USING BTREE,
         KEY `refId` (`refId`) USING BTREE,
         KEY `vehicleId` (`vehicleId`) USING BTREE
       ) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
   
       CREATE TABLE `fenceconfigurationset` (
         `id` bigint(20) NOT NULL AUTO_INCREMENT,
         `companyId` int(11) DEFAULT '0',
         `createDate` datetime DEFAULT NULL,
         `deleted` bit(1) DEFAULT b'0',
         `owner` varchar(255) DEFAULT NULL,
         `remark` varchar(255) DEFAULT NULL,
         `configurationId` bigint(20) NOT NULL,
         `setId` bigint(20) NOT NULL,
         `sort` int(11) NOT NULL,
         PRIMARY KEY (`id`) USING BTREE,
         UNIQUE KEY `id` (`id`) USING BTREE,
         KEY `setId` (`setId`) USING BTREE,
         KEY `configurationId` (`configurationId`) USING BTREE
       ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT;
   ##
   sql statement
   ##
        SELECT
   		f.*,
   		ifnull(v.num,0) as vehicleNum,
   		ifnull(c.num,0) as confNum
   		FROM
   		fenceset	f
   		LEFT JOIN ( SELECT refId, count( 1 ) num FROM vehiclefencebind v GROUP BY refId )v on f.id=v.refId
   		LEFT JOIN (select setId,count(1) num from fenceconfigurationset group by setId) c on f.id=c.setId
   ##
   ### 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: notifications-unsubscribe@shardingsphere.apache.org.apache.org

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


[GitHub] [shardingsphere] terrymanu commented on issue #17903: Column index out of range

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

   What is your configuration?


-- 
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] terrymanu commented on issue #17903: Column index out of range

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

   Closed because of no feedback for long time


-- 
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] terrymanu closed issue #17903: Column index out of range

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #17903: Column index out of range
URL: https://github.com/apache/shardingsphere/issues/17903


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