Uploaded image for project: 'XWiki Platform'
  1. XWiki Platform
  2. XWIKI-11962

Failure while restoring/scheduling WatchList jobs

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 7.0-rc-1
    • Fix Version/s: 7.0
    • Component/s: Watchlist
    • Labels:
    • Difficulty:
      Unknown
    • Documentation:
      N/A
    • Documentation in Release Notes:
      N/A
    • Similar issues:

      Description

      The migration from plugin to component introduced in XWIKI-11760 did not update the scheduler job objects of the watchlist jobs to use the new package name of the WatchListJob class.

      This causes the following stack trace to be logged at startup:

      2015-03-24 17:35:31,644 [XWiki Scheduler initialization] ERROR c.x.x.p.s.SchedulerPlugin      - Failed to restore job with in document [xwiki:Scheduler.WatchListDailyNotifier] and wiki [xwiki] 
      com.xpn.xwiki.plugin.scheduler.SchedulerPluginException: Error number 90006 in 5: Exception in plugin [com.xpn.xwiki.plugin.scheduler.SchedulerPlugin]: Error while loading job class for job : WatchList daily notifier
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:408) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:310) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:303) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.restoreExistingJobs(SchedulerPlugin.java:288) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.initAsync(SchedulerPlugin.java:157) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.access$000(SchedulerPlugin.java:69) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin$1.run(SchedulerPlugin.java:116) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70) [xwiki-commons-context-7.0-milestone-2.jar:na]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      Caused by: java.lang.ClassNotFoundException: com.xpn.xwiki.plugin.watchlist.WatchListJob
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_75]
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_75]
              at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_75]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_75]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_75]
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450) ~[jetty-webapp-8.1.10.v20130312.jar:9.2.3.v20140905]
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403) ~[jetty-webapp-8.1.10.v20130312.jar:9.2.3.v20140905]
              at java.lang.Class.forName0(Native Method) ~[na:1.7.0_75]
              at java.lang.Class.forName(Class.java:191) ~[na:1.7.0_75]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:352) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              ... 8 common frames omitted
      2015-03-24 17:35:31,646 [XWiki Scheduler initialization] ERROR c.x.x.p.s.SchedulerPlugin      - Failed to restore job with in document [xwiki:Scheduler.WatchListHourlyNotifier] and wiki [xwiki] 
      com.xpn.xwiki.plugin.scheduler.SchedulerPluginException: Error number 90006 in 5: Exception in plugin [com.xpn.xwiki.plugin.scheduler.SchedulerPlugin]: Error while loading job class for job : WatchList hourly notifier
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:408) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:310) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:303) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.restoreExistingJobs(SchedulerPlugin.java:288) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.initAsync(SchedulerPlugin.java:157) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.access$000(SchedulerPlugin.java:69) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin$1.run(SchedulerPlugin.java:116) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70) [xwiki-commons-context-7.0-milestone-2.jar:na]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      Caused by: java.lang.ClassNotFoundException: com.xpn.xwiki.plugin.watchlist.WatchListJob
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_75]
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_75]
              at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_75]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_75]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_75]
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450) ~[jetty-webapp-8.1.10.v20130312.jar:9.2.3.v20140905]
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403) ~[jetty-webapp-8.1.10.v20130312.jar:9.2.3.v20140905]
              at java.lang.Class.forName0(Native Method) ~[na:1.7.0_75]
              at java.lang.Class.forName(Class.java:191) ~[na:1.7.0_75]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:352) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              ... 8 common frames omitted
      2015-03-24 17:35:31,648 [XWiki Scheduler initialization] ERROR c.x.x.p.s.SchedulerPlugin      - Failed to restore job with in document [xwiki:Scheduler.WatchListWeeklyNotifier] and wiki [xwiki] 
      com.xpn.xwiki.plugin.scheduler.SchedulerPluginException: Error number 90006 in 5: Exception in plugin [com.xpn.xwiki.plugin.scheduler.SchedulerPlugin]: Error while loading job class for job : WatchList weekly notifier
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:408) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:310) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:303) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.restoreExistingJobs(SchedulerPlugin.java:288) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.initAsync(SchedulerPlugin.java:157) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.access$000(SchedulerPlugin.java:69) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin$1.run(SchedulerPlugin.java:116) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70) [xwiki-commons-context-7.0-milestone-2.jar:na]
              at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      Caused by: java.lang.ClassNotFoundException: com.xpn.xwiki.plugin.watchlist.WatchListJob
              at java.net.URLClassLoader$1.run(URLClassLoader.java:366) ~[na:1.7.0_75]
              at java.net.URLClassLoader$1.run(URLClassLoader.java:355) ~[na:1.7.0_75]
              at java.security.AccessController.doPrivileged(Native Method) ~[na:1.7.0_75]
              at java.net.URLClassLoader.findClass(URLClassLoader.java:354) ~[na:1.7.0_75]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:425) ~[na:1.7.0_75]
              at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ~[na:1.7.0_75]
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:450) ~[jetty-webapp-8.1.10.v20130312.jar:9.2.3.v20140905]
              at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:403) ~[jetty-webapp-8.1.10.v20130312.jar:9.2.3.v20140905]
              at java.lang.Class.forName0(Native Method) ~[na:1.7.0_75]
              at java.lang.Class.forName(Class.java:191) ~[na:1.7.0_75]
              at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:352) [xwiki-platform-scheduler-api-7.0-milestone-2.jar:na]
              ... 8 common frames omitted
      

      Resulting in the WatchList jobs not being scheduled, not even on a manual schedule command from the Scheduler application's UI.

      Workaround: A quick fix is to edit each WatchListJob document's SchedulerJobClass object and change the Job Class field's value:

      • from: com.xpn.xwiki.plugin.watchlist.WatchListJob
      • to: org.xwiki.watchlist.internal.job.WatchListJob

        Attachments

          Activity

            People

            • Assignee:
              enygma Eduard Moraru
              Reporter:
              enygma Eduard Moraru
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: