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/12/26 08:33:20 UTC

[GitHub] [shardingsphere] TeslaCN opened a new issue, #23102: java.lang.NullPointerException occurred when PostgreSQL describing insert returning composite type

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

   ## Bug Report
   
   ### Which version of ShardingSphere did you use?
   
   master - 440536943ccad254425c25aadb1b491ffd9d1670
   
   ### Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   
   ShardingSphere-Proxy PostgreSQL
   
   ### Expected behavior
   
   No error occurred.
   
   ### Actual behavior
   
   Client:
   ```
   Exception in thread "main" org.postgresql.util.PSQLException: ERROR: java.lang.NullPointerException
   	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2675)
   	at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2365)
   	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:355)
   	at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:315)
   	at org.postgresql.jdbc.PgPreparedStatement.getMetaData(PgPreparedStatement.java:1108)
   ```
   
   Proxy:
   ```
   [ERROR] 2022-12-26 16:27:41.316 [Connection-1-ThreadExecutor] o.a.s.p.f.c.CommandExecutorTask - Exception occur: 
   java.lang.NullPointerException: null
   	at java.base/java.util.Objects.requireNonNull(Objects.java:208)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.describe.PostgreSQLComDescribeExecutor.describeReturning(PostgreSQLComDescribeExecutor.java:201)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.describe.PostgreSQLComDescribeExecutor.lambda$describeInsertStatementByDatabaseMetaData$0(PostgreSQLComDescribeExecutor.java:139)
   	at java.base/java.util.Optional.map(Optional.java:260)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.describe.PostgreSQLComDescribeExecutor.describeInsertStatementByDatabaseMetaData(PostgreSQLComDescribeExecutor.java:139)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.describe.PostgreSQLComDescribeExecutor.tryDescribePreparedStatement(PostgreSQLComDescribeExecutor.java:121)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.describe.PostgreSQLComDescribeExecutor.describePreparedStatement(PostgreSQLComDescribeExecutor.java:113)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.describe.PostgreSQLComDescribeExecutor.execute(PostgreSQLComDescribeExecutor.java:97)
   	at org.apache.shardingsphere.proxy.frontend.postgresql.command.query.extended.PostgreSQLAggregatedCommandExecutor.execute(PostgreSQLAggregatedCommandExecutor.java:41)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.executeCommand(CommandExecutorTask.java:110)
   	at org.apache.shardingsphere.proxy.frontend.command.CommandExecutorTask.run(CommandExecutorTask.java:77)
   	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
   	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
   	at java.base/java.lang.Thread.run(Thread.java:833)
   ```
   
   ### Steps to reproduce the behavior, such as: SQL to execute, sharding rule configuration, when exception occur etc.
   
   No rule configured in logic database.
   
   ```sql
   create table t (id int, val varchar);
   ```
   
   ### Example codes for reproduce this issue (such as a github link).
   
   ```java
   PreparedStatement preparedStatement = connection.prepareStatement("insert into t (val) values ('') returning t");
   ResultSetMetaData metaData = preparedStatement.getMetaData();
   metaData.getColumnLabel(1);
   ```
   


-- 
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] taojintianxia closed issue #23102: java.lang.NullPointerException occurred when PostgreSQL describing insert returning composite type

Posted by GitBox <gi...@apache.org>.
taojintianxia closed issue #23102: java.lang.NullPointerException occurred when PostgreSQL describing insert returning composite type
URL: https://github.com/apache/shardingsphere/issues/23102


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