Could not open JDBC connection for transaction
A user encounters this error:
Could not open JDBC Connection for transaction
or this:
connections could not be acquired from the underlying database
Statement
Take the time to follow each of these ideas until you find a root cause. Note carefully the results of each. If these do not resolve the problem, make sure relevant logs are uploaded to Jira and analyze them.
Causes and solutions
SPA cannot establish a connection to its database. There are a number of causes for this:
The database configuration details you entered are incorrect or have changed. For example, the database name or database username or password for your SPA database. Confirm that the database username, password, and connection URL in
<SPA-home>/SPA.cfg.xmlare incorrect. If not, update them accordingly.The URL for the database is incorrect. For example, if the database connection is jdbc:mysql://yma/SPA?autoReconnect=true, find out if the host
ymaexists and the database server is installed onyma. Check<SPA-home>/SPA.cfg.xmlto find this entry.The database server is not running. If your database server is down, restart it and check the logs to see why it had failed or stopped.
The network is down (or there is a firewall in between SPA and its database), and the connection to the database cannot be established. If your network is down or a new firewall is installed, consult with your System Administrator for further troubleshooting.
Your database password has expired. If your password has expired (and you will only discover this if you try to connect to your database via your database client or an external database tool, such as DbVisualizer), update your password. You may want to deactivate expiring passwords for your SPA database user to prevent the problem from happening again. Be sure to consult with your Database Analysts about this.
PostgreSQL specific issue: the PostgreSQL encryption method has been altered or changed when migrating or upgrading SPA, the environment, and so on. Check the
pg_hba.conffile. If the method is set toident, change it tomd5.MySQL specific issue: there are too many connection requests that triggered MySQL server to block SPA from making any requests.