No operations allowed after statement closed

后端 未结 3 1945
逝去的感伤
逝去的感伤 2021-01-03 05:04

I am getting the Exception with the signature No operations allowed after statement closed. inside my Java code where I am trying to insert values into the data

3条回答
  •  孤城傲影
    2021-01-03 05:20

    statement is static, so it's shared among instances (and threads). One thread is probably trying to use that object after another one has closed it.

    It is generally a bad idea to share database connections and statements between threads since JDBC does not require connections to be thread-safe.

提交回复
热议问题