Skip to main content

Howto avoid java.sql.SQLException: at deployment and startup

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
No replies
vea
Offline
Joined: 2014-07-25

Hi there,

I've defined a MySql JDBC connection pool in my glassfish server.
The thing is this connection isn't always available, I'm catching the exception in my application and handle things.
The problem is when deploying or starting the application an "java.sql.SQLException: Connection could not be allocated because: The application requester cannot establish the connection. (Connection timed out: connect) " occurs when the connection is not available and the application isn't started.
My question is how to avoid this so my application does start up and the exception can be handled when the connection is needed in my application.

Thanks in advance,
Arco