I am using oracle database 10g express edition. Recently I am facing ORA-12516 error frequently. It says -- "java.sql.SQLException: Listener refused the connection with the following error: ORA-12516, TNS:listener could not find available handler with matching protocol stack The Connection descriptor used by the client was: //127.0.0.1:1521/XE"
As far as I am concerned this error is shown when user doesn't close variables like "Statement" "Resultset" and opens a lot of them. Every time I created any "Statement" or "ResultSet" type variables in a function I used this function -- http://paste.ubuntu.com/7902053/ to close those variables. I didn't close those variables in a final block of the function inside which those were declared. Instead I called this function (close_calls(..)) to close those variables and sent them as parameters inside the function close_calls(..). For example I called the function given above in no 17 and 23 line here -- http://paste.ubuntu.com/7902114/
But this error is still shown in the console. Is close_call(...) not working ? How can I get rid of this error ? I got the idea of closing those variables from here --- Closing Database Connections in Java