0

The following code will execute for 160 times in single page load. After 10 to 15 times im getting the following Exception: [Oracle][ODBC][Ora]ORA-12520: TNS:listener could not find available handler for requested type of server

Code is

 package ServletPkg;

import java.sql.*;
public class CheckSeat {


public boolean checkSeat(String seatNo,String showID)
{
    Statement stmt;
ResultSet rs;
Connection con;
boolean m=false;
String seat=seatNo;
String show=showID;
try
{

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc:odbc:ob","Online_Booking","password");
   stmt = con.createStatement();
   rs = stmt.executeQuery("select * from booking_info where book_seat like '%"+seat+"%' and show_id = '"+show+"'");
   if(rs.next())
   {
       m=true;
       System.out.println("Seat Selected");
   }
   con.close();
 }

 catch(Exception e)
 {
    System.out.println(e.getMessage());
 }
    return m;
}
}

Im using this code in JSP

  • 1
    The problem is in the URL to connect with your Oracle server, specifically this `"jdbc:odbc:ob"`. – Luiggi Mendoza Jan 27 '13 at 17:33
  • @LuiggiMendoza No problem is not with URL...Problem solved its with system(Oracle) processes problem..im executing a query for 160 times..but the default process capacity is 40 so we have to increase that by sign into oracle as Sys as Sysdba set processes to 200+ – Vijay Karthik Jan 28 '13 at 18:56
  • [This](https://dba.stackexchange.com/questions/186067/unable-to-connect-to-oracle-11g-server-remotely-using-sql-developer-ora-12520) might help. – Prasad Jadhav Feb 27 '19 at 12:52

0 Answers0