I am getting an error message when a program I wrote tries to access an oracle database. I wrote the program in java using jdbc. Every morning at 3am the program access the database to update the information. Since the server times out the connection for inactivity by then I use this line of code to refresh the connection.
connection = DriverManager.getConnection(url, username, password);
statement = connection.createStatement();
The error message I get is:
java.sql.SQlException: Listener refused the connection with the following exception:
ORA-12518, TNS: listener could not hand off client connection
The Connection descriptor used by the client was:
Java.sql.SQlException: Closed Connection
Java.sql.SQlException: Must be logged on to server
Can someone help me out with this?