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

Schedule entry can be executed before plugin classloader is available to provide the requested MessageListener

    Details

      Description

      An scheduler entry (configured in liferay-portlet.xml) may not be executed because the portlet did not completed its deployment.

      Steps to repoduce

      1. Create a portlet which has at least one scheduler entry using <simple-trigger-value>.
      2. Deploy the portlet.
      3. Watch the logs for 10s.
      4. Insert breakpoint at QuartzSchedulerEngine.java, line 911 <ClassLoader classLoader = null;>.
      5. Deploy the portlet again and wait for about 5s after the execution stopped at the breakpoint.
      6. Continue code execution.
      7. Watch the logs again.

      Expected results

      • There should be no stack trace on the log (step 3).
      • Schedule should print a log message on step 3 and step 7.

      Actual results

      • On step 3 there is a error printed on the log
      16:36:54,925 WARN  [liferay/scheduler_engine-1][ProxyMessageListener:81] com.liferay.portal.kernel.scheduler.SchedulerException: Unable to schedule job
      com.liferay.portal.kernel.scheduler.SchedulerException: Unable to schedule job
      	at com.liferay.portal.scheduler.quartz.QuartzSchedulerEngine.schedule(QuartzSchedulerEngine.java:415)
      	at sun.reflect.GeneratedMethodAccessor108.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:606)
      	at com.liferay.portal.kernel.messaging.proxy.ProxyRequest.execute(ProxyRequest.java:86)
      	at com.liferay.portal.kernel.messaging.proxy.ProxyMessageListener.receive(ProxyMessageListener.java:51)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:72)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:71)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:728)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:639)
      	at java.lang.Thread.run(Thread.java:724)
      Caused by: com.liferay.portal.kernel.scheduler.SchedulerException: Unable to register message listener with name com.liferay.STVML
      	at com.liferay.portal.scheduler.quartz.QuartzSchedulerEngine.getMessageListener(QuartzSchedulerEngine.java:605)
      	at com.liferay.portal.scheduler.quartz.QuartzSchedulerEngine.registerMessageListeners(QuartzSchedulerEngine.java:934)
      	at com.liferay.portal.scheduler.quartz.QuartzSchedulerEngine.schedule(QuartzSchedulerEngine.java:400)
      	... 10 more
      Caused by: java.lang.ClassNotFoundException: com.liferay.STVML
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1714)
      	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1559)
      	at com.liferay.portal.scheduler.quartz.QuartzSchedulerEngine.getMessageListener(QuartzSchedulerEngine.java:592)
      	... 12 more
      
      • Schedule entry message is not displayed on step 3.
      • Schedule entry message is printed after step 7.

      Note

      This problem is not reproducible if one uses a property-key-defined scheduler entry because these entries are failing due LPS-50532.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  5 years, 23 weeks, 6 days ago

                  Packages

                  Version Package
                  7.0.0 M4