If a Liferay instance starts up with a queued publication, a NPE is thrown.
Steps to reproduce:
- Setup two different servers to be able to use Remote Staging between them.
- Create two Sites on the first and two Sites on the second environment.
- Enable Remote Staging between the Sites on the first and the second server.
- Create 500 Web Content on the first Staging Site (we need a longer publish process).
- Create any content on the second Staging Site.
- Open both Staging Sites on different browser tabs.
- Publish the first Staging Site.
- While the process is running, publish the second Staging Site -> it will become queued.
- Wait until the first publish get past 50% and shut down the Staging server (leave the Live running).
- Start the Staging server again.
- Check the second Site's publication.
Expected Result: Successful publish on the second Site.
Actual Result: The second queued publication failed with a NullPointerException. This exception is also present in the startup logs (attached).
reproduced on ee-6.2.x @ a61e0817498b362a2aa047fdaca1d919b5f23cc6
Not reproduced on master @ 67f33a8339ef47355292beef2ffff309802e05c1
- Since the publication on separate Sites can go parallel here, I had to use the same Site for testing.
- Note: A different issue was also observed: the interrupted publication had an 'in progress' status after the server restart
This fix is a unique fix for 62x only. This issue was most likely resolved in master by
LPS-55228. The fix in master resolved the issue by delaying certain initializations during startup by using osgi service trackers, which will not be backported to 62x.