Legacy Knowledge Base
Published Sep. 10, 2025

Context initialization failed errors on deploying custom layout template

Written By

Kanchan Bisht

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

Legacy Article

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Cannot deploy custom layout template to the portal
  • Steps to reproduce:
    Startup
    Deploy the attached custom layout template
    Expected Behavior: It should be deployed successfully.
    Observed Behavior: The following error is thrown in the server console 
    • INFO [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:212] Processing custom-layout-layouttpl.war  
      INFO [fileinstall-directory-watcher][BaseAutoDeployListener:34] Copying layout templates for /opt/dev/projects/github/liferay-portal/bundles/tomcat-9.0.83/temp/20231218215714420AEMYVNPH/custom-layout-layouttpl.war
       
      INFO [fileinstall-directory-watcher][BaseAutoDeployListener:41] Layout templates for /opt/dev/projects/github/liferay-portal/bundles/tomcat-9.0.83/temp/20231218215714420AEMYVNPH/custom-layout-layouttpl.war copied successfully
      INFO [fileinstall-directory-watcher][BundleStartStopLogger:68] STARTED custom-layout-layouttpl_1.0.0 [1492]
      ERROR [fileinstall-directory-watcher][ContextLoader:313] Context initialization failed com.liferay.portal.kernel.bean.BeanLocatorException: org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named 'configurableApplic
      ationContextConfigurator' available
      at com.liferay.portal.bean.BeanLocatorImpl.locate(BeanLocatorImpl.java:96) ~[portal-impl.jar:?] at com.liferay.portal.kernel.bean.PortalBeanLocatorUtil.locate(PortalBeanLocatorUtil.java:54) ~[portal-kernel.jar:?]
      at com.liferay.portal.osgi.web.wab.extender.internal.PortletContextLoaderListener.customizeContext(PortletContextLoaderListener.java:194) ~[?:?]
      at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:400) ~[spring-web.jar:5.2.24.RELEASE]
      at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:292) ~[spring-web.jar:5.2.24.RELEASE]
      at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:103) ~[spring-web.jar:5.2.24.RELEASE]
      at com.liferay.portal.osgi.web.wab.extender.internal.PortletContextLoaderListener.contextInitialized(PortletContextLoaderListener.java:115) ~[?:?]
      at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter._initializeContext(ServletContextListenerExceptionAdapter.java:116) ~[?:?]
      at com.liferay.portal.osgi.web.wab.extender.internal.adapter.ServletContextListenerExceptionAdapter.contextInitialized(ServletContextListenerExceptionAdapter.java:96) ~[?:?]
      at sun.reflect.GeneratedMethodAccessor515.invoke(Unknown Source) ~[?:?]

Environment

  • Liferay DXP 7.4 

Resolution

  • The observed behavior is a known regression bug of DXP 7.4 that is addressed via LPS-204310 

Additional Information

Did this article resolve your issue ?

Legacy Knowledge Base