oracle.jdbc.ReadTimeout and Socket read timed out

不羁岁月 提交于 2019-12-24 16:28:41

问题


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)

回答1:


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.

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.



来源:https://stackoverflow.com/questions/34538417/oracle-jdbc-readtimeout-and-socket-read-timed-out

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!