Oracle Java.sql.sqlrecoverableexception Io Error Socket Closed
Contents |
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring java.sql.sqlrecoverableexception: io error: socket read timed out oracle developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask io error socket read timed out sql developer Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join oracle.net.ns.netexception: socket read timed out them; it only takes a minute: Sign up java.sql.SQException: Io exception: Socket read timed out vs Closed Connection up vote 6 down vote favorite I am trying to research this issue on the following two errors connecting to Oracle
Socket Read Timed Out Oracle 11g
DBs: Closed Connection java.sql.SQException: Io exception: Socket read timed out My understanding: Closed Connection : Is occurring either because there was some sort of network disruption or the DB closed the session due to some sort "inactivity" java.sql.SQException: Io exception: Socket read timed out : This is a case where the connection was made successfully but for some reason the socket/data was empty and eventually it timed-out because no data was available. Is it possible to replicate the above java.sql.sqlexception socket read timed out errors in a local Oracle DB env ? What are the steps ? I appreciate you taking the time to respond. Thanks. java sql oracle exception jdbc share|improve this question edited May 21 '13 at 20:46 Konstantin Yovkov 45.2k54497 asked May 21 '13 at 20:40 kart0624 45116 add a comment| 2 Answers 2 active oldest votes up vote 0 down vote I have just started working with the java.sql.* package, but here is what I understand. A closed connection is an error that occurs and the DB session closes, but no error handling is done so that is the end of it. With java.SQException you can manage this error (use a throws clause) and print it out or do other error handling methods. Here is a link from Oracle about Exceptions and how to handle them. Hope this helps. Exceptions in Java. share|improve this answer answered May 21 '13 at 21:00 troy_frommer 116120 Thanks for the input. For the Closed Connection error, I am trying to figure out if there's difference between DB closing the connection and network disturbance, whether both provides the same error or if there's a distinction. Also, both I believe both are exceptions right java.sql.SQLRecoverableException: Closed Connection Also what about Socket timed out exception, on what are the specific causes for it like "network" disruption. –kart0624 May 21 '13 at 23:03 @kart0624 I'm not sure about t
here for a quick overview of the site Help Center Detailed answers to any questions you might oracle database socket read timed out have Meta Discuss the workings and policies of this site About
Io Error: Connection Timed Out
Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads
Java Sql Sqlexception Socket Read Timed Out Oracle
with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million http://stackoverflow.com/questions/16679108/java-sql-sqexception-io-exception-socket-read-timed-out-vs-closed-connection programmers, just like you, helping each other. Join them; it only takes a minute: Sign up IO Error: Socket read timed out. What are the reasons? up vote 3 down vote favorite My simplified code (which demonstrates that the connection breaks with error "IO Error: Socket read timed out"): DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver()); this.connection = DriverManager.getConnection("jdbc:oracle:thin:@", properties); while(isStarted){ http://stackoverflow.com/questions/24011258/io-error-socket-read-timed-out-what-are-the-reasons this.statement = this.connection.createStatement(); ResultSet result = this.statement.executeQuery("select sysdate from dual"); result.next(); System.out.println("Sysdate: " + result.getString(1)); result.close(); this.statement.close(); this.statement = null; TimeUnit.SECONDS.sleep(4); } this.connection.close(); this.connection = null; after 4-5 hours i catched: IO Error: Socket read timed out java.sql.SQLRecoverableException: IO Error: Socket read timed out at oracle.jdbc.driver.T4CStatement.executeForDescribe(T4CStatement.java:886) at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1167) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1289) at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java:1491) at oracle.jdbc.driver.OracleStatementWrapper.executeQuery(OracleStatementWrapper.java:406) What are the reasons? how to solve this problem? java oracle jdbc share|improve this question edited Jun 3 '14 at 10:09 asked Jun 3 '14 at 9:12 user2795559 31116 There is only one reason. The database didn't respond within the timeout period. Why on earh are you doing this non-event in a loop at all? –EJP Jun 3 '14 at 9:50 My simplified code (which demonstrates that the connection breaks with error "IO Error: Socket read timed out"). I connect only one time, and after that use connection everywere. –user2795559 Jun 3 '14 at 11:12 What is the connectivity to the database? A socket
java.sql.SQLRecoverableException: IO Error: Socket read timed out during adop/adpatch While applying the R12.2 upgrade driver, we faced the issue of WFXLoad.class failing in adworker log but showing up as running on adctrl Control Worker Code Context http://oracleappstechnology.blogspot.com/2014/11/mystery-of-javasqlsqlrecoverableexcepti.html Filename Status ------ -------- ----------------- -------------------------- -------------- 1 Run AutoPatch R120 pl WFXLoad.class Running 2 Run AutoPatch R120 pl WFXLoad.class Running 3 Run AutoPatch R120 pl WFXLoad.class timed out Running 4 Run AutoPatch R120 pl WFXLoad.class Running 5 Run AutoPatch R120 pl WFXLoad.class Running 6 Run AutoPatch R120 pl Wait socket read timed 7 Run AutoPatch R120 pl WFXLoad.class Running 8 Run AutoPatch R120 pl WFXLoad.class Running 9 Run AutoPatch R120 pl WFXLoad.class Running 10 Run AutoPatch R120 pl Wait adworker log shows: Exception in thread "main" java.sql.SQLRecoverableException: IO Error: Socket read timed out at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:482) at oracle.jdbc.driver.PhysicalConnection.(PhysicalConnection.java:678) at oracle.jdbc.driver.T4CConnection.(T4CConnection.java:238) at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:34) at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:567) at java.sql.DriverManager.getConnection(DriverManager.java:571) at java.sql.DriverManager.getConnection(DriverManager.java:215) at oracle.apps.ad.worker.AdJavaWorker.getAppsConnection(AdJavaWorker.java:1041) at oracle.apps.ad.worker.AdJavaWorker.main(AdJavaWorker.java:276) Caused by: oracle.net.ns.NetException: Socket read timed out at oracle.net.ns.Packet.receive(Packet.java:341) at oracle.net.ns.NSProtocol.connect(NSProtocol.java:308) at oracle.jdbc.driver.T4CConnection.connect(T4CConnection.java:1222) at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:330) ... 8 more This was happening again and again. The DBAs were suspecting network issue, cluster issue, server issue and all the usual suspects. In Database alert log we saw these errors coming every few seconds: Fatal NI connec