Deploying a config file without the UUID for factory configurations breaks the configuration admin portlet and prevents user from adding new configurations in the UI
Fix Priority
Affects versions
Fix versions
Description
Attachments
- 07 Dec 2017, 10:42 AM
Activity

John Co August 22, 2023 at 10:45 PM
Closing as no longer reproducible based on previous comment.
Lily Li July 27, 2023 at 2:57 AMEdited
Can not reproduced on:
Tomcat 9.0.75 + MySQL 5.7. Portal master DXP GIT ID: 64fb76697a19d1ac5a86195dfe57077711ba983e.
The CXF Endpoints add page keeps the default and does not load the config file value.
The Save button has not been replaced with an Update button.
The new CXF Endpoints entry can be added successfully but the console has an error:
2023-07-27 02:46:21.930 ERROR [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration~45c4538a-a268-44c9-af71-abf4bb85df3d)][ROOT:47] bundle com.liferay.portal.remote.cxf.common:7.0.16 (306)[com.liferay.portal.remote.cxf.common.internal.CXFEndpointPublisher(1005)] : factory pid com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration, but this pid is already supplied as a singleton: [com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration] at index 0 2023-07-27 02:46:21.932 ERROR [CM Event Dispatcher (Fire ConfigurationEvent: pid=com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration~45c4538a-a268-44c9-af71-abf4bb85df3d)][LogService:47] Unexpected problem delivering configuration event to [org.osgi.service.cm.ConfigurationListener, id=80, bundle=61/file:/home/liferay/Bundles/liferay-portal-tomcat-master-private/liferay-portal-master-private/osgi/static/org.apache.felix.configadmin.jar?protocol=jar&static=true] java.lang.IllegalStateException: Factory pid supplied after all non-factory configurations supplied com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.checkFactoryPidIndex(ConfigurableComponentHolder.java:535) ~[?:?] at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:366) ~[?:?] at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:325) ~[?:?] at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:119) ~[?:?] at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1686) [bundleFile:?] at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1637) [bundleFile:?] at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [bundleFile:?] at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [bundleFile:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_221]
Drew Brokke March 24, 2020 at 3:56 PM
@Pei-Jung Lan @Russ Bohl Sorry about the delay on this. I'm not aware of any recent change made in this area. I can try to look at it a little more this week.
Russ Bohl March 19, 2020 at 3:32 PM
Thanks @Pei-Jung Lan.
In light of your finding, I think we should change this text:
For configuration entries supporting factory configurations, omitting the subname from a `.config` file's name causes System Settings to disallow adding new entries for the configuration entry targeted by this `.config` file. This is caused by a known bug. See https://liferay.atlassian.net/browse/LPS-76352#icft=LPS-76352(https://issues.liferay.com/browse/LPS-76352) for more information. Once an improperly named configuration file is deployed, you can't add any entries for the configuration in question from its System Settings entry.
But I'm not sure what to change it to. I'll give it more thought tomorrow, but feel free to provide input.
Russ Bohl March 18, 2020 at 6:57 AM
@Dennis Ju @Pei-Jung Lan I'm porting our 7.2 docs to liferay-learn and 7.3, and I am moving forward assuming I should continue documenting this bug. Please correct me if I'm wrong.
Steps to reproduce:
1. Deploy the attached config file to osgi/configs.
a. The config file has the following name:
com.liferay.portal.remote.cxf.common.configuration.CXFEndpointPublisherConfiguration.config
2. Go to Configuration Admin -> CXF Endpoints
3. Click on + to add an entry (There should be no existing entries)
4. Note that the edit screen now loads the settings specified in the attached file instead of the default values.
5. Note that the Update button. This replaces the Save button.
6. When clicking update and returning to the CXF Endpoints list, no entries are listed.