SQL 可恢复异常

SQL recoverable Exception

我在我的一台测试服务器上得到这个堆栈跟踪。

java.sql.SQLRecoverableException: IO Error: Connection timed out
            at oracle.jdbc.driver.T4CConnection.createTemporaryClob(T4CConnection.java:3401)
            at oracle.jdbc.driver.PhysicalConnection.createClob(PhysicalConnection.java:9680)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)
            at oracle.ucp.jdbc.proxy.JDBCConnectionProxyFactory.invoke(JDBCConnectionProxyFactory.java:213)
            at com.sun.proxy.$Proxy58.createClob(Unknown Source)
            at com.ril.payment.PaymentProxyDAO.initiateTransaction(PaymentProxyDAO.java:37)
            at com.ril.payment.PaymentProxyFIS.recharge(PaymentProxyFIS.java:153)
            at com.ril.payment.PaymentProxyService.recharge(PaymentProxyService.java:46)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
            at java.lang.reflect.Method.invoke(Unknown Source)

我们正在使用 Oracle 11g,Java 6 和普通 JDBC。 如果需要,可以提供更多信息。

编辑: 已请求

        poolDataSource.setConnectionFactoryClassName(connectioPoolClass);
        poolDataSource.setURL(hostUrl);
        poolDataSource.setUser(userName);
        poolDataSource.setPassword(passwd);
        poolDataSource.setConnectionPoolName(UCP_POOL);
        poolDataSource.setInitialPoolSize(50);
        poolDataSource.setMinPoolSize(20);
        poolDataSource.setMaxPoolSize(200);
        poolDataSource.setConnectionWaitTimeout(5);

来自java docs

The subclass of SQLException thrown in situations where a previously failed operation might be able to succeed if the application performs some recovery steps and retries the entire transaction or in the case of a distributed transaction, the transaction branch. At a minimum, the recovery operation must include closing the current connection and getting a new connection.

在您的情况下,超时意味着您应该能够通过再次尝试连接来恢复。

当然,如果你的连接设置不正确,你可能每次都会遇到异常,因此你试图连接到一些没有正确收听的东西。