Setting Network Timeout for JDBC connection

前端 未结 3 528
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-11-28 10:47

I\'m trying to set a network time-out my Oracle database Connection in Java. However, I\'m getting an error. Below is sample code and it\'s respective exception.

<         


        
3条回答
  •  一生所求
    2020-11-28 11:34

    From the Oracle's documentation: "setNetworkTimeout throws an SQLException if: a database access error occurs, this method is called on a closed connection, the executor is NULL". The latter seems your case.

提交回复
热议问题