Details
-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
17.10.14
-
None
-
Unknown
-
Description
Context
During an upgrade of an XWiki instance from 16.10.5 to 17.10.14, the Distribution Wizard goes through normally on the main wiki. The issue only appears when the Distribution Wizard is run on a sub-wiki.
Issue
On the sub-wiki, the "Orphan dependencies" step proposes 2 extensions for uninstallation:
- Ratings Application 16.10.5 (org.xwiki.platform:xwiki-platform-ratings-ui)
- Attachment Picker Macro 17.10.14 (org.xwiki.platform:xwiki-platform-attachment-picker-macro)
See screenshot below.
Uninstalling these orphan dependencies also deletes the pages that come with them and with the flavor from the sub-wiki, for example Main.WebHome, XWiki.Ratings.* , Attachment.Picker.Code.* and SomeProjectCode.*. The sub-wiki is then left with a broken home page and missing application pages.
The step also ends with an error (see screenshot below).
The job log (job id extensions/distribution/clean/uninstall) shows:
Starting job of type [uninstall] with identifier [extensions/distribution/clean/uninstall] Starting job of type [uninstallplan] Resolving extension [Ratings Application 16.10.5] from namespace [TEST-WIKI] Resolving extension [Attachment Picker Macro 17.10.14] from namespace [TEST-WIKI] Resolving extension [Attachment Picker Application 17.10.14] from namespace [TEST-WIKI] Resolving extension [XWiki Standard Common Application 17.10.14] from namespace [TEST-WIKI] Resolving extension [XWiki Standard Flavor for sub-wikis 17.10.14] from namespace [TEST-WIKI] Resolving extension [XWiki Projects - Some Project - Wikis - Public (FE) 8.0] from namespace [TEST-WIKI] Finished job of type [uninstallplan] Applying [UNINSTALL] for extension [Ratings Application 16.10.5] on namespace [TEST-WIKI] from previous extension(s) [org.xwiki.platform:xwiki-platform-ratings-ui/16.10.5] Preparing XAR extension plan XAR extension plan ready Successfully applied [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-ratings-ui/16.10.5] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-ratings-ui/16.10.5] Applying [UNINSTALL] for extension [com.xwiki.projects.someproject:xwiki-someproject-wikis-front-end/8.0] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [com.xwiki.projects.someproject:xwiki-someproject-wikis-front-end/8.0] Successfully applied [UNINSTALL] for extension [com.xwiki.projects.someproject:xwiki-someproject-wikis-front-end/8.0] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [com.xwiki.projects.someproject:xwiki-someproject-wikis-front-end/8.0] Applying [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-distribution-flavor-wiki/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-distribution-flavor-wiki/17.10.14] Successfully applied [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-distribution-flavor-wiki/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-distribution-flavor-wiki/17.10.14] Applying [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-distribution-flavor-common/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-distribution-flavor-common/17.10.14] Successfully applied [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-distribution-flavor-common/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-distribution-flavor-common/17.10.14] Applying [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-attachment-picker-ui/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-attachment-picker-ui/17.10.14] Successfully applied [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-attachment-picker-ui/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-attachment-picker-ui/17.10.14] Applying [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-attachment-picker-macro/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-attachment-picker-macro/17.10.14] Successfully applied [UNINSTALL] for extension [org.xwiki.platform:xwiki-platform-attachment-picker-macro/17.10.14] on namespace [#wikiHomePageLink($argument)] from previous extension(s) [org.xwiki.platform:xwiki-platform-attachment-picker-macro/17.10.14] class com.xpn.xwiki.objects.StringProperty cannot be cast to class com.xpn.xwiki.objects.NumberProperty (com.xpn.xwiki.objects.StringProperty and com.xpn.xwiki.objects.NumberProperty are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @36790bec) class java.lang.ClassCastException: class com.xpn.xwiki.objects.StringProperty cannot be cast to class com.xpn.xwiki.objects.NumberProperty (com.xpn.xwiki.objects.StringProperty and com.xpn.xwiki.objects.NumberProperty are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @36790bec) at com.xpn.xwiki.objects.NumberProperty.equals(NumberProperty.java:111) at com.xpn.xwiki.objects.BaseCollection.equals(BaseCollection.java:839) at com.xpn.xwiki.objects.BaseObject.equals(BaseObject.java:340) at com.xpn.xwiki.doc.XWikiDocument.equalsData(XWikiDocument.java:5124) at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.maybeDeletePages(XarExtensionJobFinishedListener.java:251) at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.onEvent(XarExtensionJobFinishedListener.java:156) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:343) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:308) at org.xwiki.job.AbstractJob.jobFinished(AbstractJob.java:297) at org.xwiki.extension.job.internal.AbstractExtensionJob.jobFinished(AbstractExtensionJob.java:134) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:251) at org.xwiki.job.AbstractJob.run(AbstractJob.java:223) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) class com.xpn.xwiki.objects.StringProperty cannot be cast to class com.xpn.xwiki.objects.NumberProperty (com.xpn.xwiki.objects.StringProperty and com.xpn.xwiki.objects.NumberProperty are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @36790bec) class java.lang.ClassCastException: class com.xpn.xwiki.objects.StringProperty cannot be cast to class com.xpn.xwiki.objects.NumberProperty (com.xpn.xwiki.objects.StringProperty and com.xpn.xwiki.objects.NumberProperty are in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @36790bec) at com.xpn.xwiki.objects.NumberProperty.equals(NumberProperty.java:111) at com.xpn.xwiki.objects.BaseCollection.equals(BaseCollection.java:839) at com.xpn.xwiki.objects.BaseObject.equals(BaseObject.java:340) at com.xpn.xwiki.doc.XWikiDocument.equalsData(XWikiDocument.java:5124) at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.maybeDeletePages(XarExtensionJobFinishedListener.java:251) at org.xwiki.extension.xar.internal.handler.XarExtensionJobFinishedListener.onEvent(XarExtensionJobFinishedListener.java:156) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:343) at org.xwiki.observation.internal.DefaultObservationManager.notify(DefaultObservationManager.java:308) at org.xwiki.job.AbstractJob.jobFinished(AbstractJob.java:297) at org.xwiki.extension.job.internal.AbstractExtensionJob.jobFinished(AbstractExtensionJob.java:134) at org.xwiki.job.AbstractJob.runInContext(AbstractJob.java:251) at org.xwiki.job.AbstractJob.run(AbstractJob.java:223) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) at java.base/java.lang.Thread.run(Thread.java:1583) Deleted document [TEST-WIKI » SomeProjectCode » Translations] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » SomeProjectCode » BlogPostLayoutXXXTeaser] Deleted document [TEST-WIKI » XWiki » DocumentDoesNotExist] Deleted document [TEST-WIKI » search » WebHome] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » Attachment » Picker » Code » WebHome] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsMacros] Deleted document [TEST-WIKI » SomeProjectCode » SearchMedia] ... Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsConfiguration] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » SomeProjectCode » FrontEndTheme] Deleted document [TEST-WIKI » Attachment » Picker » Code » CKEditorImagePlugin] Deleted document [TEST-WIKI » SomeProjectCode » Search] Deleted document [TEST-WIKI » SomeProjectCode » NewsletterTeaserMacro] Deleted document [TEST-WIKI » XWiki » BlogEditors] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » SomeProjectCode » Error404] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » SomeProjectCode » XMLExport] Deleted document [TEST-WIKI » SomeProjectCode » NavigationBarSearch] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » SomeProjectCode » InfoBannerMacro] Deleted document [TEST-WIKI » SomeProjectCode » SearchAlpha] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » PanelsCode » ApplicationsPanelConfiguration] Deleted document [TEST-WIKI » SomeProjectCode » xxxConfigurationClass] Deleted document [TEST-WIKI » Attachment » Picker » Code » AttachmentGalleryPicker] Deleted document [TEST-WIKI » SomeProjectCode » SearchCategoryMacros] Deleted document [TEST-WIKI » SomeProjectCode » SearchDossier] ... Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » SomeProjectCode » SearchMediaSelect] .... Deleted document [TEST-WIKI » search » alphabetic] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » SomeProjectCode » SearchAuthor] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » search » media] Deleted document [TEST-WIKI » SomeProjectCode » FrontSkin] Deleted document [TEST-WIKI » SomeProjectCode » AdBannerSSX] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » SomeProjectCode » SitemapService] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » SomeProjectCode » FEAdministration] Deleted document [TEST-WIKI » SomeProjectCode » BackToSearch] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » opendata » WebHome] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » Attachment » Picker » Code » Translations] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » about » news » WebHome] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsTranslations] Deleted document [TEST-WIKI » SomeProjectCode » HomePageSSX] Deleted document [TEST-WIKI » XWiki » Ratings » WebHome] Deleted document [TEST-WIKI » SomeProjectCode » NavigationBarUIX] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsUIX] Deleted document [TEST-WIKI » SomeProjectCode » AboutPanel] Deleted document [TEST-WIKI » SomeProjectCode » BlogPostLayoutXXXLink] Deleted document [TEST-WIKI » SomeProjectCode » SearchCategory] Deleted document [TEST-WIKI » about » newsletter] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » search » category] Deleted document [TEST-WIKI » Main » WebHome] Deleted document [TEST-WIKI » XWiki » Ratings » RatingsConfigurationClass] Deleted document [TEST-WIKI » PanelsCode » NavigationConfiguration] Deleted document [TEST-WIKI » search » dossiers] Deleted document [TEST-WIKI » SomeProjectCode » ShareholicConfiguration] Finished job of type [uninstall] with identifier [extensions/distribution/clean/uninstall]
Expected behavior
Uninstalling orphan dependencies should not delete pages that belong to the flavor or to extensions still needed by the sub-wiki.
Workaround
Do not uninstall the orphan dependencies (skip the step or leave them unselected). The orphans stay installed, which is harmless.
Note that the list of proposed orphan dependencies is not stable. After restoring a backup and restarting the upgrade, the "Orphan dependencies" step showed different extensions (see attached screenshot):
- Ratings Application 16.10.5 (same as before)
- PDF Export default API implementation 17.10.14