Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.sql.SQLException: Io exception: Operation interrupted

843859May 8 2010 — edited Nov 20 2014
Hi Guys,

I am getting the following application when a prepared statement execute query is fired on any tables in the database.
There is no issues in getting the connection, but when i use that connection to query the tables exception is thrown, now same code worked fine in production for almost 2 years.
10/05/08 11:58:28 java.sql.SQLException: Io exception: Operation interrupted
10/05/08 11:58:28       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:189)
10/05/08 11:58:28       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:231)
10/05/08 11:58:28       at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:345)
10/05/08 11:58:28       at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java:2519)
10/05/08 11:58:28       at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2660)
10/05/08 11:58:28       at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:457)
10/05/08 11:58:28       at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:387)
10/05/08 11:58:28       at mun.gov.data.DataHelper.getNews(DataHelper.java:133)
10/05/08 11:58:28       at _pages._news__ar._jspService(_news__ar.java:56)
10/05/08 11:58:28       at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
10/05/08 11:58:28       at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
10/05/08 11:58:28       at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
10/05/08 11:58:28       at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
10/05/08 11:58:28       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
10/05/08 11:58:28       at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
10/05/08 11:58:28       at com.evermind.server.http.ServletRequestDispatcher.include(ServletRequestDispatcher.java:121)
10/05/08 11:58:28       at com.evermind.server.http.EvermindPageContext.include(EvermindPageContext.java:267)
10/05/08 11:58:28       at _index__ar._jspService(_index__ar.java:72)
10/05/08 11:58:28       at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56)
10/05/08 11:58:28       at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:347)
10/05/08 11:58:28       at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:509)
10/05/08 11:58:28       at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:413)
10/05/08 11:58:28       at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
10/05/08 11:58:28       at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:765)
10/05/08 11:58:28       at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:317)
10/05/08 11:58:28       at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:790)
10/05/08 11:58:28       at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:208)
10/05/08 11:58:28       at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:125)
10/05/08 11:58:28       at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:192)
10/05/08 11:58:28       at java.lang.Thread.run(Thread.java:534)
Environment information :

Application server : Oracle 10G 9.0.4
JDK version : 1.4.2
Database :Oracle 10G 10.2.0.4

Now why is this exception thrown in all of a sudden ? i have the same code (different applications) working fine in another instance of the same server.
This i think would not be a code problem since the same code executed fine before.
static public Connection getDBConnection() {
       Connection conn = null;
       
       
      String username = "username";
      String password = "password";
        try {
            Class.forName("oracle.jdbc.driver.OracleDriver");
            conn =
 
         DriverManager.getConnection("jdbc:oracle:thin:@DBIP:1521:servicename",username, password);
 
        } catch (SQLException ex) {
            System.out.println("Cannot get connection: " + ex);
        } catch (Exception ex) {
            System.out.println("Cannot get connection: " + ex);
        }
        return conn;
 
    }
The code i use to get connection from Database.

Could any one please tell why this exception is thrown? Is it thrown because of any DB or Network issues? What is root cause of the Exception.


Regards
Vishnu
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 7 2010
Added on May 8 2010
3 comments
450 views