I’ve followed the installation guide for XWiki using Tomcat. I’m using Tomcat 10 (10.0.4) with java 15.0.2 2021-01-19. However, every time Tomcat tries to deploy the XWiki application, it fails with the following error:
Apr 03, 2021 2:34:05 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class [org.xwiki.container.servlet.XWikiServletContextListener]
java.lang.NoClassDefFoundError: javax/servlet/ServletContextListener
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(Unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(Unknown Source)
at org.apache.catalina.core.StandardContext.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.ContainerBase.addChildInternal(Unknown Source)
at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployWAR(Unknown Source)
at org.apache.catalina.startup.HostConfig$DeployWar.run(Unknown Source)
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(Unknown Source)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at org.apache.catalina.startup.HostConfig.deployWARs(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
at org.apache.catalina.startup.HostConfig.start(Unknown Source)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(Unknown Source)
at org.apache.catalina.util.LifecycleBase.setStateInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.setState(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(Unknown Source)
at org.apache.catalina.core.StandardHost.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.ContainerBase$StartChild.call(Unknown Source)
at org.apache.catalina.core.ContainerBase$StartChild.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(Unknown Source)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(Unknown Source)
at org.apache.catalina.core.StandardEngine.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.StandardService.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.StandardServer.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:241)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletContextListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
... 55 more
Apr 03, 2021 2:34:05 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Error configuring application listener of class [org.xwiki.container.servlet.SetThreadNameServletRequestListener]
java.lang.NoClassDefFoundError: javax/servlet/ServletRequestListener
at java.base/java.lang.ClassLoader.defineClass1(Native Method)
at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1016)
at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:151)
at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.findClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.loadClass(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(Unknown Source)
at org.apache.catalina.core.DefaultInstanceManager.newInstance(Unknown Source)
at org.apache.catalina.core.StandardContext.listenerStart(Unknown Source)
at org.apache.catalina.core.StandardContext.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.ContainerBase.addChildInternal(Unknown Source)
at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployWAR(Unknown Source)
at org.apache.catalina.startup.HostConfig$DeployWar.run(Unknown Source)
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(Unknown Source)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:118)
at org.apache.catalina.startup.HostConfig.deployWARs(Unknown Source)
at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
at org.apache.catalina.startup.HostConfig.start(Unknown Source)
at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source)
at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(Unknown Source)
at org.apache.catalina.util.LifecycleBase.setStateInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.setState(Unknown Source)
at org.apache.catalina.core.ContainerBase.startInternal(Unknown Source)
at org.apache.catalina.core.StandardHost.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.ContainerBase$StartChild.call(Unknown Source)
at org.apache.catalina.core.ContainerBase$StartChild.call(Unknown Source)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at org.apache.tomcat.util.threads.InlineExecutorService.execute(Unknown Source)
at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
at org.apache.catalina.core.ContainerBase.startInternal(Unknown Source)
at org.apache.catalina.core.StandardEngine.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.StandardService.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.core.StandardServer.startInternal(Unknown Source)
at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
at org.apache.catalina.startup.Catalina.start(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.catalina.startup.Bootstrap.start(Unknown Source)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:64)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:564)
at org.apache.commons.daemon.support.DaemonLoader.start(DaemonLoader.java:241)
Caused by: java.lang.ClassNotFoundException: javax.servlet.ServletRequestListener
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(Unknown Source)
... 55 more
Apr 03, 2021 2:34:05 PM org.apache.catalina.core.StandardContext listenerStart
SEVERE: Skipped installing application listeners due to previous error(s)
Apr 03, 2021 2:34:05 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: One or more listeners failed to start. Full details will be found in the appropriate container log file
Apr 03, 2021 2:34:05 PM org.apache.catalina.core.StandardContext startInternal
SEVERE: Context [] startup failed due to previous errors
I’m not sure what I’m doing wrong. I’m using Arch Linux, AMD 64, postgresql as my database server, kernel 5.11.10.
Edit: I also added the security policy to /etc/tomcat10/catalina.policy and altered it to fit my environment.