You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "Great11111 (via GitHub)" <gi...@apache.org> on 2024/08/30 07:58:13 UTC

[I] Column index out of range [shardingsphere]

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

   sharding-jdbc version 5.2.1
   sql:select b.* from (select distinct(uid) form tableA) a innier join tableB b on a.uid =b.uid
   
   exception:
   Column index out of range.; nested exception is java.sql.SQLException: Column index out of range.
   detail:
   Caused by: java.sql.SQLException: Column index out of range.
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
   	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
   	at com.mysql.cj.jdbc.result.ResultSetMetaData.getField(ResultSetMetaData.java:223)
   	at com.mysql.cj.jdbc.result.ResultSetMetaData.getColumnLabel(ResultSetMetaData.java:181)
   	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 sun.reflect.GeneratedMethodAccessor151.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.Plugin.invoke(Plugin.java:64)
   	at com.sun.proxy.$Proxy587.query(Unknown Source)
   	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 com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor.intercept(MybatisPlusInterceptor.java:81)
   	at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:62)
   	at com.sun.proxy.$Proxy586.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.GeneratedMethodAccessor153.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)


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


Re: [I] Column index out of range [shardingsphere]

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

   Since this issus has been fixed, I will close it now.


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


Re: [I] Column index out of range [shardingsphere]

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

   Thanks, if I don't upgrade, is there any way to solve it


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


Re: [I] Column index out of range [shardingsphere]

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

   Thanks, if I don't upgrade, is there any way to solve it


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


Re: [I] Column index out of range [shardingsphere]

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

   Of course, you could refer the latest document to upgrade.


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


Re: [I] Column index out of range [shardingsphere]

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

   Thanks, if I don't upgrade, is there any way to solve it


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


Re: [I] Column index out of range [shardingsphere]

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

   There is no way to solve this problem without upgrading, unless you synchronize the master code to a lower version yourself, but considering the huge difference, this is almost impossible to accomplish.


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


Re: [I] Column index out of range [shardingsphere]

Posted by "strongduanmu (via GitHub)" <gi...@apache.org>.
strongduanmu closed issue #32732: Column index out of range
URL: https://github.com/apache/shardingsphere/issues/32732


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


Re: [I] Column index out of range [shardingsphere]

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

   i user shardingsphere-jdbc-core-spring-boot-starter :
   <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
               <version>5.2.1</version>
      </dependency>
      This is the latest version. If I use the shardingsphere-jdbc-core last version, do I need to modify other configurations or do they affect my other templates


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


Re: [I] Column index out of range [shardingsphere]

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

   Can you try the latest version?  I think this bug has been solved by new sql binder module.


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