无法在关闭的连接上调用方法,在理想的连接时间后面临这个问题 tera 数据池 [英] Cannot call a method on closed connection, facing this issue after ideal time of connection tera data pool

查看:22
本文介绍了无法在关闭的连接上调用方法,在理想的连接时间后面临这个问题 tera 数据池的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

errorMsg=java.sql.SQLException: [Teradata JDBC 驱动程序] [TeraJDBC 16.10.00.03] [错误 1095] [SQLState HY000] 无法在关闭的连接上调用方法.2020-02-24 10:11:12.757 错误 [aciisst-services,3f7cb6b7495a5c38,3f7cb6b7495a5c38,false] 7 --- [XNIO-2 task-24] errorMsg=JDBC [JDBC]Tera.data10Tera..00.03] [错误 1095] [SQLState HY000] 无法在关闭的连接上调用方法

errorMsg=java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.10.00.03] [Error 1095] [SQLState HY000] Cannot call a method on closed connection. 2020-02-24 10:11:12.757 ERROR [aciisst-services,3f7cb6b7495a5c38,3f7cb6b7495a5c38,false] 7 --- [ XNIO-2 task-24] errorMsg=java.sql.SQLException: [Teradata JDBC Driver] [TeraJDBC 16.10.00.03] [Error 1095] [SQLState HY000] Cannot call a method on closed connection

推荐答案

当您的应用程序在连接关闭后调用方法时,Teradata JDBC 驱动程序会引发该异常.当您的应用调用 Connection.close 方法时连接会关闭,但当发生网络通信故障并且 Teradata JDBC 驱动程序失去与数据库的连接时,连接也会关闭.

The Teradata JDBC Driver throws that exception when your app calls a method after the connection has been closed. The connection is closed when your app calls the Connection.close method, but the connection is also closed when a network communication failure occurs and the Teradata JDBC Driver loses its connection to the database.

您说连接池中的 JDBC 连接会出现此错误.数据库管理员可以配置 Viewpoint 以终止空闲会话.连接池中的 JDBC 连接通常是空闲的,因此如果管理员将 Viewpoint 配置为终止空闲连接,则将被终止.

You said that this error occurs for JDBC connections in a connection pool. Database administrators can configure Viewpoint to terminate idle sessions. JDBC connections in a connection pool are often idle, and therefore will be terminated if the administrator has configured Viewpoint to terminate idle connections.

如果连接池中的 JDBC 连接因空闲而终止,然后您的应用从池中租用该连接并尝试使用该连接,那么您将收到此错误.

If a JDBC connection in a connection pool was terminated because it was idle, and then your app leases the connection from the pool and tries to use the connection, then you will get this error.

解决方案是让您的管理员从终止空闲会话的 Viewpoint 配置中排除池化 JDBC 连接.

The solution is to have your administrator exclude pooled JDBC connections from the Viewpoint configuration that terminates idle sessions.

这篇关于无法在关闭的连接上调用方法,在理想的连接时间后面临这个问题 tera 数据池的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆