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

Failed to initialize local extension [org.xwiki.platform:xwiki-platform-export-pdf-ui] error when upgrading XWiki

    XMLWordPrintable

Details

    • Bug
    • Resolution: Won't Fix
    • Major
    • None
    • 16.2.0
    • None
    • None
    • Windows 11 Pro, Firefox 124, using a local instance of XWiki 16.2.0 on Tomcat 9.0.87, MariaDB 11.3, reproducible also on Jetty/HSQL
    • Unknown

    Description

      Steps to reproduce

      1. Create an older instance of XWiki (e.g. 14.10.21)
      2. Replace the WAR with the one from a newer XWiki version (e.g. 16.2.0) or the data folder in the newer version (on Jetty/HSQL)
      3. Start XWiki to perform the upgrade
      4. Observe the logs

      Expected results

      No errors are displayed.

      Actual results

      The following error is displayed:

      2024-03-26 17:26:51,484 [main] ERROR .i.DefaultExtensionInitializer - Failed to initialize local extension [org.xwiki.platform:xwiki-platform-export-pdf-ui/14.10.21]
      org.xwiki.extension.ExtensionException: Failed to initialize dependency [org.xwiki.platform:xwiki-platform-export-pdf-default-14.10.21]
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionDependencyInNamespace(DefaultExtensionInitializer.java:216)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:170)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:148)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtension(DefaultExtensionInitializer.java:118)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initialize(DefaultExtensionInitializer.java:104)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initialize(DefaultExtensionInitializer.java:80)
              at org.xwiki.component.embed.InitializableLifecycleHandler.handle(InitializableLifecycleHandler.java:39)
              at org.xwiki.component.embed.EmbeddableComponentManager.createInstance(EmbeddableComponentManager.java:550)
              at org.xwiki.component.embed.EmbeddableComponentManager.getComponentInstance(EmbeddableComponentManager.java:636)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:329)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:320)
              at org.xwiki.component.embed.EmbeddableComponentManager.getInstance(EmbeddableComponentManager.java:290)
              at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:116)
              at org.eclipse.jetty.server.handler.ContextHandler.callContextInitialized(ContextHandler.java:1049)
              at org.eclipse.jetty.servlet.ServletContextHandler.callContextInitialized(ServletContextHandler.java:624)
              at org.eclipse.jetty.server.handler.ContextHandler.contextInitialized(ContextHandler.java:984)
              at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:740)
              at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
              at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1304)
              at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:901)
              at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
              at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:532)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
              at org.eclipse.jetty.deploy.bindings.StandardStarter.processBinding(StandardStarter.java:40)
              at org.eclipse.jetty.deploy.AppLifeCycle.runBindings(AppLifeCycle.java:183)
              at org.eclipse.jetty.deploy.DeploymentManager.requestAppGoal(DeploymentManager.java:516)
              at org.eclipse.jetty.deploy.DeploymentManager.addApp(DeploymentManager.java:151)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.fileAdded(ScanningAppProvider.java:210)
              at org.eclipse.jetty.deploy.providers.WebAppProvider.fileAdded(WebAppProvider.java:442)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider$1.fileAdded(ScanningAppProvider.java:61)
              at org.eclipse.jetty.util.Scanner$DiscreteListener.pathAdded(Scanner.java:284)
              at org.eclipse.jetty.util.Scanner.reportAddition(Scanner.java:896)
              at org.eclipse.jetty.util.Scanner.reportDifferences(Scanner.java:862)
              at org.eclipse.jetty.util.Scanner.scan(Scanner.java:769)
              at org.eclipse.jetty.util.Scanner.startScanning(Scanner.java:658)
              at org.eclipse.jetty.util.Scanner.doStart(Scanner.java:630)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
              at org.eclipse.jetty.deploy.providers.ScanningAppProvider.doStart(ScanningAppProvider.java:182)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
              at org.eclipse.jetty.deploy.DeploymentManager.startAppProvider(DeploymentManager.java:605)
              at org.eclipse.jetty.deploy.DeploymentManager.doStart(DeploymentManager.java:246)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
              at org.eclipse.jetty.server.Server.start(Server.java:470)
              at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
              at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
              at org.eclipse.jetty.server.Server.doStart(Server.java:415)
              at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
              at org.eclipse.jetty.xml.XmlConfiguration.main(XmlConfiguration.java:1919)
              at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
              at java.base/java.lang.reflect.Method.invoke(Method.java:580)
              at org.eclipse.jetty.start.Main.invokeMain(Main.java:229)
              at org.eclipse.jetty.start.Main.start(Main.java:528)
              at org.eclipse.jetty.start.Main.main(Main.java:76)
      Caused by: org.xwiki.extension.ExtensionException: Failed to initialize dependency [org.xwiki.platform:xwiki-platform-export-pdf-api-14.10.21]
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionDependencyInNamespace(DefaultExtensionInitializer.java:216)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:170)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:148)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:163)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:148)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionDependencyInNamespace(DefaultExtensionInitializer.java:205)
              ... 55 common frames omitted
      Caused by: java.lang.NoClassDefFoundError: org/xwiki/script/internal/safe/ScriptSafeProvider
              at java.base/java.lang.ClassLoader.defineClass1(Native Method)
              at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1027)
              at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:150)
              at java.base/java.net.URLClassLoader.defineClass(URLClassLoader.java:524)
              at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:427)
              at java.base/java.net.URLClassLoader$1.run(URLClassLoader.java:421)
              at java.base/java.security.AccessController.doPrivileged(AccessController.java:714)
              at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:420)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
              at org.xwiki.component.annotation.ComponentAnnotationLoader.getComponentsDescriptors(ComponentAnnotationLoader.java:159)
              at org.xwiki.component.annotation.ComponentAnnotationLoader.register(ComponentAnnotationLoader.java:212)
              at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:137)
              at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.loadComponents(JarExtensionHandler.java:251)
              at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.install(JarExtensionHandler.java:183)
              at org.xwiki.extension.jar.internal.handler.JarExtensionHandler.initialize(JarExtensionHandler.java:144)
              at org.xwiki.extension.handler.internal.DefaultExtensionHandlerManager.initialize(DefaultExtensionHandlerManager.java:154)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:175)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionInNamespace(DefaultExtensionInitializer.java:148)
              at org.xwiki.extension.handler.internal.DefaultExtensionInitializer.initializeExtensionDependencyInNamespace(DefaultExtensionInitializer.java:205)
              ... 60 common frames omitted
      Caused by: java.lang.ClassNotFoundException: org.xwiki.script.internal.safe.ScriptSafeProvider
              at java.base/java.net.URLClassLoader.findClass(URLClassLoader.java:445)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:593)
              at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
              ... 80 common frames omitted

      Attachments

        Activity

          People

            tmortagne Thomas Mortagne
            iandriuta Ilie Andriuta
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: