-
Type:
Bug
-
Status: Closed
-
Resolution: Fixed
-
Affects Version/s: 7.0.X EE
-
Fix Version/s: 7.0.0 DXP FP26, 7.0.X EE, 7.0.4 CE GA5
-
Component/s: Dynamic Data Mapping
-
Branch Version/s:7.0.x
-
Backported to Branch:Committed
-
Story Points:1.5
-
Fix Priority:3
-
Git Pull Request:
Description:
A ClassCastException occurs for the DDMStructureIndexerBackgroundTaskExecutor when attempting to modify a custom DDM structure that is used by a lot of asset types (Web Content, DDL, etc.)
Steps to reproduce:
1) Setup a unicast cluster.
2) On Node 1, create a custom Web Content Structure. 'testStructure123'
3) On Node 1, create a lot of articles using the structure from Step 2. In my testing, I created roughly 400+ articles.
4) On node 1, edit 'testStructure123' - add or remove a field. Save.
5) On node 2, edit 'testStructure123' - add or remove a field. Save.
Expected Result:
Updating a custom structure should not cause a ClassCastException.
Actual Results:
Upon updating a structure, a ClassCastException occurs.
23:52:58,733 ERROR [liferay/background_task-1][BackgroundTaskMessageListener:165] Unable to execute background task java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.Long at com.liferay.dynamic.data.mapping.background.task.DDMStructureIndexerBackgroundTaskExecutor.execute(DDMStructureIndexerBackgroundTaskExecutor.java:68) at com.liferay.portal.kernel.backgroundtask.SerialBackgroundTaskExecutor.execute(SerialBackgroundTaskExecutor.java:54) at com.liferay.portal.kernel.backgroundtask.DelegatingBackgroundTaskExecutor.execute(DelegatingBackgroundTaskExecutor.java:43) at com.liferay.portal.kernel.backgroundtask.ThreadLocalAwareBackgroundTaskExecutor.execute(ThreadLocalAwareBackgroundTaskExecutor.java:56) at com.liferay.portal.background.task.internal.messaging.BackgroundTaskMessageListener.doReceive(BackgroundTaskMessageListener.java:124) at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26) at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74) at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:756) at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:667) at java.lang.Thread.run(Thread.java:748)
Branch:
Reproduced in ee-7.0.x (8e5c6ec09156d00ec2014bd7f45555141fceffb0).
Master:
Issue is not reproduced because of a new commit made to the Story ticket LPS-50640.
Notes:
The issue appears to be tied into how we handle the the Background Tasks:
https://github.com/liferay/liferay-portal-ee/blob/ee-7.0.x/modules/apps/forms-and-workflow/dynamic-data-mapping/dynamic-data-mapping-service/src/main/java/com/liferay/dynamic/data/mapping/background/task/DDMStructureIndexerBackgroundTaskExecutor.java#L68
We should not be able to assume it is a long. At best our assumption can be that it is a number.
- is fixed by
-
LPS-50640 Add cancelletion support to the Background Tasks framework
-
- Closed
-