Issue
- The server logs show the following messages before the theme is fully deployed:
2025-07-09 06:25:20.463 WARN [https-jsse-nio-8443-exec-14][ThemeLocalServiceImpl:220] No theme found for specified theme id classic_WAR_classictheme. Returning the default theme.
- This issue happens when an HTTP request (e.g., from a health check or a browser request) reaches the server before essential themes like
classic-themeor custom theme are fully deployed. The system cannot find the required theme, which results in an error.
Environment
- Liferay DXP 2024.Q1
Resolution
This behavior is expected when Liferay receives requests before its startup process is complete. To prevent these errors, it is recommended to manage incoming traffic during the startup phase.
- Place a load balancer or a reverse proxy in front of the Liferay instance.
- Configure the proxy to display a temporary maintenance page.
- Keep the maintenance page active until the Liferay instance has fully started and is ready to serve requests.
- Once Liferay is fully initialized, switch the proxy to direct traffic to the Liferay instance.
This approach ensures that no requests hit the Liferay server while it is still deploying core components, thus avoiding errors caused by race conditions during startup.