BruceZhangXL opened a new issue #9883:
URL: https://github.com/apache/shardingsphere/issues/9883
### Which version of ShardingSphere did you use?
version of ShardingSphere 4.1.1
version of druid 1.1.22
version of mysql-connector-java 8.0.17
### Which project did you use?
ShardingSphere-JDBC
### Actual behavior
`Caused by: java.sql.SQLException: Operation not allowed after ResultSet
closed
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.ResultSetImpl.checkClosed(ResultSetImpl.java:437)
at
com.mysql.cj.jdbc.result.ResultSetImpl.checkRowPos(ResultSetImpl.java:481)
at
com.mysql.cj.jdbc.result.ResultSetImpl.getString(ResultSetImpl.java:834)
at
com.alibaba.druid.filter.FilterChainImpl.resultSet_getString(FilterChainImpl.java:951)
at
com.alibaba.druid.filter.stat.StatFilter.resultSet_getString(StatFilter.java:968)
at
com.alibaba.druid.filter.FilterChainImpl.resultSet_getString(FilterChainImpl.java:947)
at
com.alibaba.druid.proxy.jdbc.ResultSetProxyImpl.getString(ResultSetProxyImpl.java:684)
at
com.alibaba.druid.pool.DruidPooledResultSet.getString(DruidPooledResultSet.java:110)
at
org.apache.shardingsphere.core.execute.sql.execute.result.StreamQueryResult.getValue(StreamQueryResult.java:74)
at
org.apache.shardingsphere.underlying.merge.impl.StreamMergedResult.getValue(StreamMergedResult.java:49)
at
org.apache.shardingsphere.encrypt.merge.dql.EncryptMergedResult.getValue(EncryptMergedResult.java:50)
at
org.apache.shardingsphere.shardingjdbc.jdbc.core.resultset.ShardingResultSet.getString(ShardingResultSet.java:164)
at
org.apache.ibatis.type.StringTypeHandler.getNullableResult(StringTypeHandler.java:37)
at
org.apache.ibatis.type.StringTypeHandler.getNullableResult(StringTypeHandler.java:26)
at
org.apache.ibatis.type.BaseTypeHandler.getResult(BaseTypeHandler.java:81)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getPropertyMappingValue(DefaultResultSetHandler.java:472)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.applyPropertyMappings(DefaultResultSetHandler.java:441)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.getRowValue(DefaultResultSetHandler.java:404)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValuesForSimpleResultMap(DefaultResultSetHandler.java:354)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleRowValues(DefaultResultSetHandler.java:328)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSet(DefaultResultSetHandler.java:301)
at
org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:194)
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:324)
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:83)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:147)
at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140)
at sun.reflect.GeneratedMethodAccessor291.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:426)
... 99 common frames omitted`
### Reason analyze
First, whether the change code of
https://github.com/apache/shardingsphere/issues/166 issure is miss.
I compared the changed code of this issure to the version of 4.1.1 in
StatementExecutor.java, I can not find the synchronized code what try to solve
the proplem of https://github.com/apache/shardingsphere/issues/166 .
## code of fixed https://github.com/apache/shardingsphere/issues/166

## code of 4.1.1

Sencod, if someone refator the code ,maybe the proplem still exists.
--
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:
[email protected]