Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-139811

When a MessageBus message is resent, it can result in a ClassCastException

    Details

    • Fix Priority:
      3

      Description

      I have a message listener which in some scenarios schedules a scheduler job.

      The message passed to the listener is reused as the scheduled job value.

      However when the scheduler engine triggers the job an ClassCastException occurs while preparing the message for delivery.

      Exception:

      2021-09-29 13:54:00.011 WARN  [PersistedQuartzSchedulerEngineInstance_Worker-1][LiferayJSONDeserializationWhitelist:50] Unable to deserialize com.liferay.portal.kernel.util.TransientValue due to security restrictions
      Exception in thread "antivirus_destination-2" java.lang.ClassCastException: java.util.HashMap cannot be cast to com.liferay.portal.kernel.security.permission.PermissionChecker
      	at com.liferay.portal.messaging.internal.MessageBusThreadLocalUtil.populateThreadLocalsFromMessage(MessageBusThreadLocalUtil.java:109)
      	at com.liferay.portal.messaging.internal.SerialDestination$1.run(SerialDestination.java:54)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              raymond.auge Raymond Auge
              Reporter:
              raymond.auge Raymond Auge
              Participants of an Issue:
              Recent user:
              Enterprise Release HU
              Engineering Assignee:
              Raymond Auge
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Days since last comment:
                9 weeks, 5 days ago

                  Packages

                  Version Package
                  7.4.13 DXP GA1
                  7.4.3.4 CE GA4
                  Master