Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

No operations allowed after statement closed #2797

Closed
1 task done
AVANZHAOYONG opened this issue Jun 12, 2020 · 2 comments
Closed
1 task done

No operations allowed after statement closed #2797

AVANZHAOYONG opened this issue Jun 12, 2020 · 2 comments

Comments

@AVANZHAOYONG
Copy link

AVANZHAOYONG commented Jun 12, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

Server in my branch registration generate this error, I use the druid connection pool, and the source code in the druid has set up a 'TimeBetweenEvictionRunsMillis',' TestWhileIdle '。I was confused。 Is it the Druid bug?

Ⅱ. Describe what happened

If there is an exception, please attach the exception trace:

com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after statement closed.
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
        at com.mysql.jdbc.Util.handleNewInstance(Util.java:409)
        at com.mysql.jdbc.Util.getInstance(Util.java:384)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1013)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:987)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:973)
        at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:918)
        at com.mysql.jdbc.StatementImpl.checkClosed(StatementImpl.java:463)
        at com.mysql.jdbc.StatementImpl.getFetchSize(StatementImpl.java:1954)
        at com.alibaba.druid.pool.DruidPooledPreparedStatement.<init>(DruidPooledPreparedStatement.java:105)
        at com.alibaba.druid.pool.DruidPooledConnection.prepareStatement(DruidPooledConnection.java:358)
        at io.seata.core.store.db.LockStoreDataBaseDAO.acquireLock(LockStoreDataBaseDAO.java:128)
        at io.seata.server.lock.db.DataBaseLocker.acquireLock(DataBaseLocker.java:64)
        at io.seata.server.lock.AbstractLockManager.acquireLock(AbstractLockManager.java:59)
        at io.seata.server.session.BranchSession.lock(BranchSession.java:274)
        at io.seata.server.transaction.at.ATCore.branchSessionLock(ATCore.java:46)
        at io.seata.server.coordinator.AbstractCore.lambda$branchRegister$0(AbstractCore.java:77)
        at io.seata.server.session.GlobalSession.lockAndExecute(GlobalSession.java:616)
        at io.seata.server.coordinator.AbstractCore.branchRegister(AbstractCore.java:72)
        at io.seata.server.coordinator.DefaultCore.branchRegister(DefaultCore.java:95)
        at io.seata.server.coordinator.DefaultCoordinator.doBranchRegister(DefaultCoordinator.java:188)
        at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:172)
        at io.seata.server.AbstractTCInboundHandler$4.execute(AbstractTCInboundHandler.java:167)
        at io.seata.core.exception.AbstractExceptionHandler.exceptionHandleTemplate(AbstractExceptionHandler.java:117)
        at io.seata.server.AbstractTCInboundHandler.handle(AbstractTCInboundHandler.java:167)
        at io.seata.core.protocol.transaction.BranchRegisterRequest.handle(BranchRegisterRequest.java:136)
        at io.seata.server.coordinator.DefaultCoordinator.onRequest(DefaultCoordinator.java:430)
        at io.seata.core.rpc.DefaultServerMessageListenerImpl.onTrxMessage(DefaultServerMessageListenerImpl.java:91)
        at io.seata.core.rpc.netty.AbstractRpcRemotingServer$ServerHandler.dispatch(AbstractRpcRemotingServer.java:196)
        at io.seata.core.rpc.netty.AbstractRpcRemoting$AbstractHandler$1.run(AbstractRpcRemoting.java:452)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
        at java.lang.Thread.run(Thread.java:748)
2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

2020-06-12 10:54:53,003 DEBUG stmt exit cache

serv

Ⅲ. Describe what you expected to happen

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. xxx
  2. xxx
  3. xxx

Ⅴ. Anything else we need to know?

Ⅵ. Environment:

  • JDK version : 1.8
  • OS : centos7
  • Others: seata 1.1.0
@slievrly
Copy link
Member

@AVANZHAOYONG You mean don't configure configuration 'TimeBetweenEvictionRunsMillis' and' TestWhileIdle' is ok?

@AVANZHAOYONG
Copy link
Author

AVANZHAOYONG commented Jun 22, 2020

@AVANZHAOYONG You mean don't configure configuration 'TimeBetweenEvictionRunsMillis' and' TestWhileIdle' is ok?
@slievrly Thank you for the response.
It seems to be caused by Druid

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants