You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Execute select statement and return query result successfully when I query the sharding tables.
Actual behavior
The ShardingSphere-JDBC return an error:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.NullPointerException
The error occurred while handling results
SQL: select id, uid, status,ctime from table_name WHERE uid =? order by ctime desc;
Cause: java.lang.NullPointerException
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
at com.sun.proxy.$Proxy356.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
at com.sun.proxy.$Proxy406.selectByExample(Unknown Source)
Reason analyze (If you can)
The ShardingSphere-JDBC can not get shard table's meta information for aws aurora postgresql 14.11 version when the db user is not same with the table owner.Since everything works well with postgresql 12.8 before I upgrade the db to postgresql 14.11 version.
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1.Create one aws aurora postgresql cluster which engine version is 14.11,and create two database db1 and db2;
2.Create a table both in db1 and db2, change the table owner to user2;
alter table owner to user2;
3.Set ShardingSphere-JDBC db user as user1
Bug Report
Which version of ShardingSphere did you use?
5.1.2
Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
ShardingSphere-JDBC
Expected behavior
Execute select statement and return query result successfully when I query the sharding tables.
Actual behavior
The ShardingSphere-JDBC return an error:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
Error querying database. Cause: java.lang.NullPointerException
The error occurred while handling results
SQL: select id, uid, status,ctime from table_name WHERE uid =? order by ctime desc;
Cause: java.lang.NullPointerException
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:97)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:439)
at com.sun.proxy.$Proxy356.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:224)
at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:147)
at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:80)
at org.apache.ibatis.binding.MapperProxy$PlainMethodInvoker.invoke(MapperProxy.java:145)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:86)
at com.sun.proxy.$Proxy406.selectByExample(Unknown Source)
Reason analyze (If you can)
The ShardingSphere-JDBC can not get shard table's meta information for aws aurora postgresql 14.11 version when the db user is not same with the table owner.Since everything works well with postgresql 12.8 before I upgrade the db to postgresql 14.11 version.
Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
1.Create one aws aurora postgresql cluster which engine version is 14.11,and create two database db1 and db2;
2.Create a table both in db1 and db2, change the table owner to user2;
alter table owner to user2;
3.Set ShardingSphere-JDBC db user as user1
4.Config table shard rule the same as offcial example and start the application and execute the query.
Example codes for reproduce this issue (such as a github link).
The text was updated successfully, but these errors were encountered: