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

SchedulerPlugin related errors when upgrading XWiki to 11.1

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 11.3-rc-1
    • 11.1
    • {Unused} Watchlist
    • None
    • Windows 10 Pro 64 bit, Chrome 72, IE11, Edge 18, Firefox 65, using a local instance XWiki 11.1 on HSQL 2.4.1, MySQL 5.7, PostgreSQL 10 and Oracle 11.2
    • Unknown
    • N/A
    • N/A

    Description

      STEPS TO REPRODUCE

      1. Create an older instance of XWiki (e.g. 9.11.8)
      2. Close the instance
      3. Go to a newer instance (11.1) and copy/cut the
        [...]webapps\xwiki

        folder and replace it (first delete the old one) in the same location on the older version

      1. Start XWiki and follow the Distribution Wizard through the upgrade process

      EXPECTED RESULTS

      The upgrade process is completed successfully without errors.

      ACTUAL RESULTS

      On XWiki initialization, there are encountered some errors in console related to SchedulerPlugin. Stacktrace:

      2019-03-05 12:56:32,023 [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:427)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:317)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:310)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.restoreExistingJobs(SchedulerPlugin.java:295)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.initAsync(SchedulerPlugin.java:167)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.access$000(SchedulerPlugin.java:79)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin$1.run(SchedulerPlugin.java:126)
      	at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.xwiki.watchlist.internal.job.WatchListJob
      	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:193)
      	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:180)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.xwiki.classloader.URIClassLoader.findClass(URIClassLoader.java:179)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at org.xwiki.classloader.xwiki.internal.ContextNamespaceURLClassLoader.loadClass(ContextNamespaceURLClassLoader.java:176)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Unknown Source)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:362)
      	... 8 common frames omitted
      2019-03-05 12:56:32,037 [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:427)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:317)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:310)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.restoreExistingJobs(SchedulerPlugin.java:295)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.initAsync(SchedulerPlugin.java:167)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.access$000(SchedulerPlugin.java:79)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin$1.run(SchedulerPlugin.java:126)
      	at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.xwiki.watchlist.internal.job.WatchListJob
      	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:193)
      	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:180)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.xwiki.classloader.URIClassLoader.findClass(URIClassLoader.java:179)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at org.xwiki.classloader.xwiki.internal.ContextNamespaceURLClassLoader.loadClass(ContextNamespaceURLClassLoader.java:176)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Unknown Source)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:362)
      	... 8 common frames omitted
      2019-03-05 12:56:32,051 [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:427)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:317)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.register(SchedulerPlugin.java:310)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.restoreExistingJobs(SchedulerPlugin.java:295)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.initAsync(SchedulerPlugin.java:167)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.access$000(SchedulerPlugin.java:79)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin$1.run(SchedulerPlugin.java:126)
      	at org.xwiki.context.concurrent.ExecutionContextRunnable.run(ExecutionContextRunnable.java:70)
      	at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.ClassNotFoundException: org.xwiki.watchlist.internal.job.WatchListJob
      	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:193)
      	at org.xwiki.classloader.URIClassLoader$1.run(URIClassLoader.java:180)
      	at java.security.AccessController.doPrivileged(Native Method)
      	at org.xwiki.classloader.URIClassLoader.findClass(URIClassLoader.java:179)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at java.lang.ClassLoader.loadClass(Unknown Source)
      	at org.xwiki.classloader.xwiki.internal.ContextNamespaceURLClassLoader.loadClass(ContextNamespaceURLClassLoader.java:176)
      	at java.lang.Class.forName0(Native Method)
      	at java.lang.Class.forName(Unknown Source)
      	at com.xpn.xwiki.plugin.scheduler.SchedulerPlugin.scheduleJob(SchedulerPlugin.java:362)
      	... 8 common frames omitted

      The issue was reproduced on HSQL, MySQL, PostgreSQL and Oracle and could not be reproduced when upgrading to XWiki 11.0.3.

      Attachments

        1. 2019_03_05.output.log
          22 kB
          Ilie Andriuta
        2. DeletedPagesOfTheWatchlist.png
          78 kB
          Guillaume Delhumeau

        Issue Links

          Activity

            [XWIKI-16204] SchedulerPlugin related errors when upgrading XWiki to 11.1

            I have created a migrator, and after it has run, you can see the deleted pages in the recycle bin:

            gdelhumeau Guillaume Delhumeau added a comment - I have created a migrator, and after it has run, you can see the deleted pages in the recycle bin:
            tmortagne Thomas Mortagne added a comment - - edited

            Yes the only effect is an annoying (but scary) log. Still it really does not looks great to end up with that every time you start XWiki.

            tmortagne Thomas Mortagne added a comment - - edited Yes the only effect is an annoying (but scary) log. Still it really does not looks great to end up with that every time you start XWiki.
            vmassol Vincent Massol added a comment -

            Actually from the logs it seems XWiki is still starting and it's "just" some errors in the logs so the severity is a bit less than what I thought. We still need to fix ASAP.

            vmassol Vincent Massol added a comment - Actually from the logs it seems XWiki is still starting and it's "just" some errors in the logs so the severity is a bit less than what I thought. We still need to fix ASAP.
            vmassol Vincent Massol added a comment -

            Note: I moved the issue to 11.3RC1 because today is the last day before the 11.2 release and there's no more time. It's a pity since this is a very important issue for our users, causing problems and frustration when they upgrade XWiki.

            vmassol Vincent Massol added a comment - Note: I moved the issue to 11.3RC1 because today is the last day before the 11.2 release and there's no more time. It's a pity since this is a very important issue for our users, causing problems and frustration when they upgrade XWiki.
            iandriuta Ilie Andriuta added a comment -

            After the upgrade process was finished, the wiki was running, no strange behavior observed, but I haven't run other tests on the migrated instance. However, the errors were displaying in console on every restart of the instance.

            iandriuta Ilie Andriuta added a comment - After the upgrade process was finished, the wiki was running, no strange behavior observed, but I haven't run other tests on the migrated instance. However, the errors were displaying in console on every restart of the instance.

            iandriuta: Except a strack trace in the logs, could you confirm it does not prevent XWiki from running?

            gdelhumeau Guillaume Delhumeau added a comment - iandriuta : Except a strack trace in the logs, could you confirm it does not prevent XWiki from running?
            gdelhumeau Guillaume Delhumeau added a comment - - edited

            We've discussed a bit this topic on matrix:

            gdelhumeau:
            These pages are not removed because they were not part of any XAR. They used to be created by mandatory initializer. Do you think we need a cleaner migrator?

            tmortagne:
            I don't see much other solution than some migration cleanup considering it's a XWiki Standard war thing, but not sure in which module this migration should go.

            gdelhumeau:
            Can't we detect mandatory documents that are not necessary anymore? And have a clean mechanism in core?

            tmortagne:
            Not in this case. We have no idea those document are mandatory documents. In other cases we could maybe imagine listening to mandatory document initializer uninstall event but we don't have that here since it's a WAR jar and there is nothing in those document indicating it's been generated by a mandatory document initializer

            gdelhumeau:
            Maybe we should introduce a metadata

            tmortagne:
            Maybe but it's too late now

            But we never went further

            gdelhumeau Guillaume Delhumeau added a comment - - edited We've discussed a bit this topic on matrix: gdelhumeau : These pages are not removed because they were not part of any XAR. They used to be created by mandatory initializer. Do you think we need a cleaner migrator? tmortagne : I don't see much other solution than some migration cleanup considering it's a XWiki Standard war thing, but not sure in which module this migration should go. gdelhumeau : Can't we detect mandatory documents that are not necessary anymore? And have a clean mechanism in core? tmortagne : Not in this case. We have no idea those document are mandatory documents. In other cases we could maybe imagine listening to mandatory document initializer uninstall event but we don't have that here since it's a WAR jar and there is nothing in those document indicating it's been generated by a mandatory document initializer gdelhumeau : Maybe we should introduce a metadata tmortagne : Maybe but it's too late now But we never went further
            vmassol Vincent Massol added a comment -

            For #xwiki chat:

            Guillaume Delhumeau: I see https://jira.xwiki.org/browse/XWIKI-16073 is still open but there have been several important commits related to it

            ah no forget it
            rolled back
            hmmm
            actually this removed the watchlist I think: https://github.com/xwiki/xwiki-platform/commit/2d419c6ed65a447be76beb835f1d2d74279993dd
            and it's not been rolled back
            I'm trying to find why we don't have the watchlist jar anymore and when it was done (which issue and which release notes)
            I'm trying to reply to https://jira.xwiki.org/browse/XWIKI-16204

            so it seems to me there's a problem with https://jira.xwiki.org/browse/XWIKI-16073 . Can you confirm that it's a mistake that it hasn't been closed? I don't think it's been fully reverted
            and if we rempved the watchlist jar it would explain why the watchlist shceduler jobs are failing now

            (since they contain a WatchListJobClass xclass)

            gdelhumeau ?

            vmassol Vincent Massol added a comment - For #xwiki chat: Guillaume Delhumeau: I see https://jira.xwiki.org/browse/XWIKI-16073 is still open but there have been several important commits related to it ah no forget it rolled back hmmm actually this removed the watchlist I think: https://github.com/xwiki/xwiki-platform/commit/2d419c6ed65a447be76beb835f1d2d74279993dd and it's not been rolled back I'm trying to find why we don't have the watchlist jar anymore and when it was done (which issue and which release notes) I'm trying to reply to https://jira.xwiki.org/browse/XWIKI-16204 so it seems to me there's a problem with https://jira.xwiki.org/browse/XWIKI-16073 . Can you confirm that it's a mistake that it hasn't been closed? I don't think it's been fully reverted and if we rempved the watchlist jar it would explain why the watchlist shceduler jobs are failing now (since they contain a WatchListJobClass xclass) gdelhumeau ?

            People

              gdelhumeau Guillaume Delhumeau
              iandriuta Ilie Andriuta
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: