Liferay Portal Failed to Initialize Because the Database Wasn’t Ready

If you start your database server and application server at the same time, Liferay Portal might try connecting to the data source before the database is ready. By default, Liferay Portal doesn’t retry connecting to the database; it just fails. But there is a way to avoid this situation: database connection retries.

  1. Create a portal-ext.properties file in your Liferay Home folder.

  2. Set the property retry.jdbc.on.startup.max.retries equal to the number of times to retry connecting to the data source.

  3. Set property retry.jdbc.on.startup.delay equal to the number of seconds to wait before retrying connection.

If at first the connection doesn’t succeed, Liferay Portal uses the retry settings to try again.

Related Topics

Connecting to JNDI Data Sources

0 (0 Votes)
Calling Non-OSGi Code that Uses OSGi Services Previous