为什么utplsql-cli命令仅在sqlplus命令之后对Hikari池抛出错误?

时间:2019-06-10 15:30:01

标签: sqlplus hikaricp utplsql

当执行utplsql-cli命令时,我已成功连接到数据库,并且所有测试均已执行。不幸的是,当之前执行任何sqlplus命令时,utplsql-cli会引发错误:

Successfully connected to database. UtPLSQL core: v3.1.6.2735
07:23:30 Oracle-Version: 12.2.0.1.0
07:23:31 HikariPool-1 - Failed to validate connection oracle.jdbc.driver.T4CConnection@2906d865 (IO Error: Invalid Operation, NOT Connected). Possibly consider using a shorter maxLifetime value.
07:23:31 HikariPool-1 - Failed to validate connection oracle.jdbc.driver.T4CConnection@48503868 (IO Error: Invalid Operation, NOT Connected). Possibly consider using a shorter maxLifetime value.
07:23:31 HikariPool-1 - Failed to validate connection oracle.jdbc.driver.T4CConnection@1deb2d37 (IO Error: Invalid Operation, NOT Connected). Possibly consider using a shorter maxLifetime value.
07:23:31 Running tests now.
07:23:31 --------------------------------------
07:23:31 TestRunner initialized
07:23:31 HikariPool-1 - Connection oracle.jdbc.driver.T4CConnection@51fa7b37 marked as broken because of SQLSTATE(08006), ErrorCode(17002)
07:23:31 java.sql.SQLRecoverableException: IO Error: Operation interrupted
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:761)
07:23:31    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904)
07:23:31    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082)
07:23:31    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)
07:23:31    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822)
07:23:31    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165)
07:23:31    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
07:23:31    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
07:23:31    at org.utplsql.api.db.DefaultDatabaseInformation.getUtPlsqlFrameworkVersion(DefaultDatabaseInformation.java:15)
07:23:31    at org.utplsql.api.compatibility.CompatibilityProxy.doCompatibilityCheckWithDatabase(CompatibilityProxy.java:65)
07:23:31    at org.utplsql.api.compatibility.CompatibilityProxy.<init>(CompatibilityProxy.java:53)
07:23:31    at org.utplsql.api.TestRunner.run(TestRunner.java:155)
07:23:31    at org.utplsql.cli.RunTestRunnerTask.call(RunTestRunnerTask.java:40)
07:23:31    at org.utplsql.cli.RunTestRunnerTask.call(RunTestRunnerTask.java:22)
07:23:31    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07:23:31    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
07:23:31    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
07:23:31    at java.lang.Thread.run(Thread.java:748)
07:23:31 Caused by: java.io.InterruptedIOException: Operation interrupted
07:23:31    at oracle.net.nt.TimeoutSocketChannel.handleInterrupt(TimeoutSocketChannel.java:311)
07:23:31    at oracle.net.nt.TimeoutSocketChannel.write(TimeoutSocketChannel.java:221)
07:23:31    at oracle.net.ns.NIOPacket.writeToSocketChannel(NIOPacket.java:211)
07:23:31    at oracle.net.ns.NIONSDataChannel.writeDataToSocketChannel(NIONSDataChannel.java:181)
07:23:31    at oracle.net.ns.NIONSDataChannel.writeDataToSocketChannel(NIONSDataChannel.java:132)
07:23:31    at oracle.jdbc.driver.T4CMAREngineNIO.prepareForReading(T4CMAREngineNIO.java:96)
07:23:31    at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:534)
07:23:31    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:485)
07:23:31    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
07:23:31    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747)
07:23:31    ... 18 common frames omitted
07:23:31 IO Error: Operation interrupted
07:23:31 java.sql.SQLRecoverableException: IO Error: Operation interrupted
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:761)
07:23:31    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:904)
07:23:31    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1082)
07:23:31    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3780)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.executeInternal(T4CPreparedStatement.java:1343)
07:23:31    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3822)
07:23:31    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1165)
07:23:31    at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)
07:23:31    at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)
07:23:31    at org.utplsql.api.db.DefaultDatabaseInformation.getUtPlsqlFrameworkVersion(DefaultDatabaseInformation.java:15)
07:23:31    at org.utplsql.api.compatibility.CompatibilityProxy.doCompatibilityCheckWithDatabase(CompatibilityProxy.java:65)
07:23:31    at org.utplsql.api.compatibility.CompatibilityProxy.<init>(CompatibilityProxy.java:53)
07:23:31    at org.utplsql.api.TestRunner.run(TestRunner.java:155)
07:23:31    at org.utplsql.cli.RunTestRunnerTask.call(RunTestRunnerTask.java:40)
07:23:31    at org.utplsql.cli.RunTestRunnerTask.call(RunTestRunnerTask.java:22)
07:23:31    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
07:23:31    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
07:23:31    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
07:23:31    at java.lang.Thread.run(Thread.java:748)
07:23:31    Suppressed: java.sql.SQLRecoverableException: Closed Connection
07:23:31        at oracle.jdbc.driver.PhysicalConnection.needLine(PhysicalConnection.java:3247)
07:23:31        at oracle.jdbc.driver.OracleStatement.closeOrCache(OracleStatement.java:1392)
07:23:31        at oracle.jdbc.driver.OracleStatement.close(OracleStatement.java:1375)
07:23:31        at oracle.jdbc.driver.OracleStatementWrapper.close(OracleStatementWrapper.java:119)
07:23:31        at oracle.jdbc.driver.OraclePreparedStatementWrapper.close(OraclePreparedStatementWrapper.java:96)
07:23:31        at com.zaxxer.hikari.pool.ProxyStatement.close(ProxyStatement.java:76)
07:23:31        at org.utplsql.api.db.DefaultDatabaseInformation.getUtPlsqlFrameworkVersion(DefaultDatabaseInformation.java:22)
07:23:31        ... 9 more
07:23:31 Caused by: java.io.InterruptedIOException: Operation interrupted
07:23:31    at oracle.net.nt.TimeoutSocketChannel.handleInterrupt(TimeoutSocketChannel.java:311)
07:23:31    at oracle.net.nt.TimeoutSocketChannel.write(TimeoutSocketChannel.java:221)
07:23:31    at oracle.net.ns.NIOPacket.writeToSocketChannel(NIOPacket.java:211)
07:23:31    at oracle.net.ns.NIONSDataChannel.writeDataToSocketChannel(NIONSDataChannel.java:181)
07:23:31    at oracle.net.ns.NIONSDataChannel.writeDataToSocketChannel(NIONSDataChannel.java:132)
07:23:31    at oracle.jdbc.driver.T4CMAREngineNIO.prepareForReading(T4CMAREngineNIO.java:96)
07:23:31    at oracle.jdbc.driver.T4CMAREngineNIO.unmarshalUB1(T4CMAREngineNIO.java:534)
07:23:31    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:485)
07:23:31    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:252)
07:23:31    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:612)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:226)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:59)
07:23:31    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:747)
07:23:31    ... 18 more

当我将utplsql-cli工具中的maxLifeTime参数更改为'0'时,

HikariPool-1 - Exception during pool initialization.
11:12:44 java.sql.SQLRecoverableException: IO Error: The Network Adapter could not establish the connection

您知道如何解决该问题吗?我在考虑sqlplus命令进行的长期会话,但是我已经使用V $ SESSION视图进行了验证。所有连接均已关闭。

预先感谢, 普热梅克

1 个答案:

答案 0 :(得分:0)