oracle.jdbc.ReadTimeout和套接字读取超时 [英] oracle.jdbc.ReadTimeout and Socket read timed out

查看:1502
本文介绍了oracle.jdbc.ReadTimeout和套接字读取超时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有时,在使用DBCP在jboss 7上运行的应用程序上出现以下错误. 我想了解:这是否意味着oracle.jdbc.ReadTimeout是否在我的应用程序上配置?如何检查oracle.jdbc.ReadTimeout的值是什么?

Sometimes I'm getting the below error on my application running on jboss 7 with DBCP . I would like to understand : does it means oracle.jdbc.ReadTimeout is configure on my application or not ? how can I check what is oracle.jdbc.ReadTimeout value ?

Caused by: oracle.net.ns.NetException: Socket read timed out
            at oracle.net.ns.Packet.receive(Packet.java:320)
            at oracle.net.ns.DataPacket.receive(DataPacket.java:103)
            at oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:230)
            at oracle.net.ns.NetInputStream.read(NetInputStream.java:175)
            at oracle.net.ns.NetInputStream.read(NetInputStream.java:100)
            at oracle.net.ns.NetInputStream.read(NetInputStream.java:85)
            at oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:122)
            at oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:78)
            at oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1179)
            at oracle.jdbc.driver.T4CMAREngine.unmarshalSB1(T4CMAREngine.java:1155)
            at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:279)
            at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:186)
            at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:521)

推荐答案

第一个问题的答案是肯定的.如果看到此异常,则必须设置read timeout属性.默认情况下,没有读取超时,因此您将永远不会看到此异常.

The answer to your first question is yes. If you're seeing this exception, then the read timeout property must be set. By default there is no read timeout and so you would never see this exception.

第二个问题的答案是取决于".可以在命令行中使用-D将读取超时设置为系统属性.也可以通过DataSource属性设置.在脚本中尝试grep替换oracle.jdbc.ReadTimeout.

The answer to your second question is 'it depends'. The read timeout can be set as a system property with -D in the command line. It can also be set through a DataSource property. Try to grep for oracle.jdbc.ReadTimeout in your scripts.

这篇关于oracle.jdbc.ReadTimeout和套接字读取超时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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