Legacy Knowledge Base
Published Jul. 2, 2025

Unable to Connect to External Datasources After Applying DXP 7.1 FP3+

Written By

Nathan Roberts

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.

This is no longer an issue with 7.1 FP10+.

Recently, LPS-85683 was implemented in Liferay DXP 7.1's core infrastructure and can be deployed by applying DXP 7.1 Fix Pack 3.  LPS-85683 detailed a project where Liferay core engineers refactored the spring extender to allow for subsequent incremental improvements in the core with the overall goal to improve performance. This was done by splitting the application context into parent (the extender's spring files) and child (the service builder service's spring files). By making this change, we can register the extender services earlier and separately from the service builder services and in the future disable some of the unused features in the parent application context.

However, at the same time, this caused specifically any customized modules connecting to an external data source that are being added via spring beans using Liferay's Spring Extender to stop working after applying Fix Pack 3. You should first read the tutorial Connecting Service Builder to External Databases to get the setup instructions before continuing.

This is a JNDI Blade sample that demonstrate how the spring.xml is used to connect to another external data source: https://github.com/liferay/liferay-blade-samples/tree/7.1/gradle/apps/service-builder/jndi.  

Note: This affects only Liferay DXP 7.1

Resolution

Fixed

Beginning with FP-3 (to FP-9):

  1. In the module, move the overriding spring.xml from /../src/main/resources/META-INF/spring/ into the folder /../src/main/resources/META-INF/spring/parent.
  2. Redeploy the module.

As noted earlier, this is because the application context was split into parent (the extender's spring files) and child (the service builder service's spring files).

Did this article resolve your issue ?

Legacy Knowledge Base