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
-
Welcome to stackoverflow. Please read https://stackoverflow.com/help/how-to-ask and ask a proper question with the needed information. – M. Deinum Mar 03 '20 at 08:43
1 Answers
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.
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.
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.
The solution is to have your administrator exclude pooled JDBC connections from the Viewpoint configuration that terminates idle sessions.

- 394
- 2
- 5