You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by "zhong2312 (via GitHub)" <gi...@apache.org> on 2023/07/04 11:10:27 UTC

[GitHub] [shardingsphere] zhong2312 opened a new issue, #26759: java.lang.NullPointerException

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

   version:5.3.2
   
   Debug:
   
   After the execution of the init method in XAShardingSphereTransactionManager, the subsequent execution will involve the close method. Inside the close method, the cachedDataSources.clear() operation will be performed.
   
   init, note the object ID @8060
   ![image](https://github.com/apache/shardingsphere/assets/4153607/deac4f21-6b0b-4cd3-a77c-608458c62c2b)
   
   
   In the close method, the cachedDataSources of the object with ID @8060 is cleared.
   ![image](https://github.com/apache/shardingsphere/assets/4153607/501fb10a-71eb-441d-9239-5d48566c4352)
   
   When invoking the getConnection method at this point, the cachedDataSources is empty.
   ![image](https://github.com/apache/shardingsphere/assets/4153607/64543e1d-b911-48d3-bc09-c9b47d637c6a)
   
   
   Then an error occurs.
   ![image](https://github.com/apache/shardingsphere/assets/4153607/9d1a04f5-8d86-4d15-9fe3-e5ce46ebf7ae)
   
   
   stack trace:
   `Caused by: java.lang.NullPointerException
   	at org.apache.shardingsphere.transaction.xa.XAShardingSphereTransactionManager.getConnection(XAShardingSphereTransactionManager.java:91)
   	at org.apache.shardingsphere.transaction.ConnectionTransaction.getConnection(ConnectionTransaction.java:106)
   	at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.createConnection(ConnectionManager.java:365)
   	at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.createConnections(ConnectionManager.java:334)
   	at org.apache.shardingsphere.driver.jdbc.core.connection.ConnectionManager.getConnections(ConnectionManager.java:323)
   	at org.apache.shardingsphere.infra.executor.sql.prepare.driver.DriverExecutionPrepareEngine.group(DriverExecutionPrepareEngine.java:88)
   	at org.apache.shardingsphere.infra.executor.sql.prepare.AbstractExecutionPrepareEngine.prepare(AbstractExecutionPrepareEngine.java:65)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.createExecutionGroupContext(ShardingSpherePreparedStatement.java:533)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.useDriverToExecute(ShardingSpherePreparedStatement.java:508)
   	at org.apache.shardingsphere.driver.jdbc.core.statement.ShardingSpherePreparedStatement.execute(ShardingSpherePreparedStatement.java:443)`


-- 
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] mahaiyun3 commented on issue #26759: java.lang.NullPointerException

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

   Hi! assign it to me please,thanks


-- 
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] An error occurs when using XA transactions:java.lang.NullPointerException [shardingsphere]

Posted by "terrymanu (via GitHub) via notifications" <no...@shardingsphere.apache.org>.
terrymanu commented on issue #26759:
URL: https://github.com/apache/shardingsphere/issues/26759#issuecomment-6559947971

   Hi @zhong2312, this bug has been fixed by #29958, included in 5.5.0. Database rule configuration changes no longer close the global transaction rule and clear its XA datasource cache through the reported path.
   
   We can close this issue as resolved. If it still occurs on the latest version, please provide a minimal reproducer.


-- 
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] An error occurs when using XA transactions:java.lang.NullPointerException [shardingsphere]

Posted by "terrymanu (via GitHub) via notifications" <no...@shardingsphere.apache.org>.
terrymanu closed issue #26759: An error occurs when using XA transactions:java.lang.NullPointerException
URL: https://github.com/apache/shardingsphere/issues/26759


-- 
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] github-actions[bot] commented on issue #26759: An error occurs when using XA transactions:java.lang.NullPointerException

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #26759:
URL: https://github.com/apache/shardingsphere/issues/26759#issuecomment-1666593545

   There hasn't been any activity on this issue recently, and in order to prioritize active issues, it will be marked as stale.


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