Just attempted upgrade to 12.5.1 - got the following error

from localhost.log

09-Jul-2020 10:02:41.996 SEVERE [main] org.apache.catalina.core.StandardContext.listenerStart Exception sending context initialized event to listener instance of class [org.xwiki.container.servlet.XWikiServletContextListener]
 java.lang.IncompatibleClassChangeError: class org.xwiki.refactoring.internal.script.DefaultRequestFactory can not implement org.xwiki.refactoring.script.RequestFactory, because it is not an interface (org.xwiki.refactoring.script.RequestFactory is in unnamed module of loader org.apache.catalina
        at java.base/java.lang.ClassLoader.defineClass1(Native Method)
        at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1017)
        at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:174)
        at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2415)
        at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:863)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1332)
        at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1186)
        at org.xwiki.component.annotation.ComponentAnnotationLoader.getComponentsDescriptors(ComponentAnnotationLoader.java:161)
        at org.xwiki.component.annotation.ComponentAnnotationLoader.register(ComponentAnnotationLoader.java:217)
        at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:138)
        at org.xwiki.component.annotation.ComponentAnnotationLoader.initialize(ComponentAnnotationLoader.java:120)
        at org.xwiki.component.embed.EmbeddableComponentManager.initialize(EmbeddableComponentManager.java:156)
        at org.xwiki.container.servlet.XWikiServletContextListener.contextInitialized(XWikiServletContextListener.java:62)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4668)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5136)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:713)
        at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)
        at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:695)
        at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:631)
        at org.apache.catalina.startup.HostConfig$DeployDescriptor.run(HostConfig.java:1832)
        at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
        at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:526)
        at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:425)
        at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1577)
        at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:309)
        at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
        at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
        at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:929)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:831)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1377)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1367)
        at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
        at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
        at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:902)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:262)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:423)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:928)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.startup.Catalina.start(Catalina.java:638)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:496)

from catalina.out

09-Jul-2020 10:02:36.780 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-80"]
09-Jul-2020 10:02:36.822 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [875] milliseconds
09-Jul-2020 10:02:36.898 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
09-Jul-2020 10:02:36.899 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.16 (Ubuntu)]
09-Jul-2020 10:02:36.909 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml]
09-Jul-2020 10:02:36.928 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored
09-Jul-2020 10:02:41.996 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal One or more listeners failed to start. Full details will be found in the appropriate container log file
09-Jul-2020 10:02:42.003 SEVERE [main] org.apache.catalina.core.StandardContext.startInternal Context [/xwiki] startup failed due to previous errors
09-Jul-2020 10:02:42.025 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has finished in [5,116] ms
09-Jul-2020 10:02:42.026 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
09-Jul-2020 10:02:42.920 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
09-Jul-2020 10:02:42.959 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat9/webapps/ROOT] has finished in [932] ms
09-Jul-2020 10:02:42.965 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-80"]
09-Jul-2020 10:02:42.995 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [6,172] milliseconds

ubuntu 18.04.4
tomcat9 9.0.16-3ubuntu0.18.04.1
xwiki-tomcat9-mysql 12.5.1+2

Could it be my version of java?

root@wikiv2:/etc/xwiki# java -version
openjdk version "11.0.7" 2020-04-14
OpenJDK Runtime Environment (build 11.0.7+10-post-Ubuntu-2ubuntu218.04)
OpenJDK 64-Bit Server VM (build 11.0.7+10-post-Ubuntu-2ubuntu218.04, mixed mode, sharing)

No, that doesn’t appear to be it. I have the same problem with using v8 of the OpenJDK.

Hi @pdwalker

Before upgrading: Did you rename xwiki.xml to ROOT.xml and changed the path, so that xwiki runs in root - or does your xwiki run under https://xwiki-address.suf/xwiki?

the latter. xwiki runs under /xwiki

default debian package install.

ok. i thought it could be one of the failures i had after upgrading, as we run xwiki in root - and during the update, the package manager reinstalled the previous deleted xwiki.xml again, so that we had both. and i had to delete the xwiki.xml to start xwiki.

i am very sorry, but i think i can’t help you :confused: -

I’ve reverted my xwiki config and app directories back to my pre update 12.1 version for now.

You sure you have 12.5.1+2 ? This error really feels like you have xwiki-platform-refactoring-api-12.4.jar (or lower) in /usr/lib/xwiki/WEB_INF/lib

1 Like

root@wikiv2:/usr/lib/xwiki.12.5.1/WEB-INF/lib# ls -l xwiki-platform-refactoring-default-12.*
-rw-r–r-- 1 root root 64867 Feb 24 16:00 xwiki-platform-refactoring-default-12.1.jar
-rw-r–r-- 1 root root 39036 Feb 24 16:00 xwiki-platform-refactoring-default-12.1.xed
-rw-r–r-- 1 root root 67126 Jul 8 07:30 xwiki-platform-refactoring-default-12.5.1.jar
-rw-r–r-- 1 root root 59767 Jul 8 07:30 xwiki-platform-refactoring-default-12.5.1.xed

Strange. Why wouldn’t the upgrade have cleared out the old jar file? That’s what seems to be the problem.

I’ll revert back to 12.5.1, remove the extra jar file and see how it behaves.

dpkg is definitely supposed to get rid of old files when upgrading (and it always did for me). Is it possible that those were patched JAR and not those that came with the standard package ?

1 Like

No, that wasn’t the problem, but it did tell me where the problem actually was.

My 12.3 upgrade via package failed during the wiki update process - no idea why, but it basically destroyed the wiki and left it unusable.

Thus, I rolled back the 12.1 site from backups.

Therefore, the upgrade process would have been looking to clean out the 12.3 jars and not the 12.1 jars, thus my having lots of extra 12.1 jar files in the directory for my 12.5.1 installation.

Thanks for the pointers! I wouldn’t have figured it out otherwise.

[edit] oh, and I have to clean out the other older jar files that are duplicates. whoops!

(now… to try the update process… )

[final edit] updating the wiki went flawlessly this time… been a while since I was problem free. excellent!