java.sql.SQLException: Listener refused the connection with the following error: ORA-12519, TNS:no appropriate service handler found

前端 未结 3 2159
栀梦
栀梦 2021-02-10 17:08

I am passing Resultset object to each thread. Each thread is connecting to the database and inserting data. Untill thread 110 it is working fine. After it crosses 111 thread it

3条回答
  •  南方客
    南方客 (楼主)
    2021-02-10 17:51

    Try this solution at your end. It worked for me. Close the connection in try/catch block and just after closing the connection, write-

    Thread.sleep(1000);
    

    In this case you can write it as-

    finally {
                try {
                    if (conn != null && !conn.isClosed())
                        {
                        conn.close();
                        Thread.sleep(1000);
                         }
                    }
                catch (SQLException e) {
                    e.printStackTrace();}
    }
    

提交回复
热议问题