XWiki-MariaDB-Tomcat9 apt install fails to start after installation

Hello XWiki people,
Today I installed XWiki on a fresh Debian 11 VM but when I go to the page http://[ip address]:8080/xwiki I get an error report which says:

30-Dec-2022 18:53:58.475 SEVERE [http-nio-8080-exec-4] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [action] in context with path [/xwiki] >
        java.lang.NullPointerException
                at com.xpn.xwiki.web.Utils.getContextComponentManager(Utils.java:680)
                at com.xpn.xwiki.web.Utils.getComponent(Utils.java:737)
                at com.xpn.xwiki.web.Utils.getComponent(Utils.java:766)
                at com.xpn.xwiki.web.Utils.getComponent(Utils.java:719)
                at org.xwiki.wysiwyg.filter.ConversionFilter.doFilter(ConversionFilter.java:55)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.xwiki.container.servlet.filters.internal.SetHTTPHeaderFilter.doFilter(SetHTTPHeaderFilter.java:63)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.xwiki.container.servlet.filters.internal.SavedRequestRestorerFilter.doFilter(SavedRequestRestorerFilter.java:208)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.xwiki.container.servlet.filters.internal.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:111)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.xwiki.resource.servlet.RoutingFilter.doFilter(RoutingFilter.java:132)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:189)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:162)
                at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:202)
                at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:97)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:542)
                at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:143)

I followed the instructions on the page Installation using Debian (.DEB) packages and I changed the Tomcat memory setup as advised.

The command java --version returns:

openjdk 11.0.16 2022-07-19
OpenJDK Runtime Environment (build 11.0.16+8-post-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 11.0.16+8-post-Debian-1deb11u1, mixed mode, sharing)

The tomcat welcome page works fine on http://[ip address]:8080

Ports listening:

# lsof -i -P -n | grep LISTEN
mariadbd 498  mysql   16u  IPv4  15978      0t0  TCP 127.0.0.1:3306 (LISTEN)
sshd     499   root    3u  IPv4  14580      0t0  TCP *:22 (LISTEN)
sshd     499   root    4u  IPv6  14582      0t0  TCP *:22 (LISTEN)
java     764 tomcat   37u  IPv6  14702      0t0  TCP *:8080 (LISTEN)

If I need to provide more information please ask me.

Thanks in advance :slight_smile:

PROBLEM SOLVED

After a lot of searching I found out that the use of a MariaDB root password may not contain special characters. I uninstalled Xwiki with

apt-get --purge remove xwiki-common

followed by

apt-get --purge autoremove

After uninstall I reinstalled XWiki, this time using a password with only numbers, small letters and capital letters.

After XWiki was reinstalled I refreshed the page and everything worked as it should.

For more information about the issue of the impossibility of the DB root password containing special characters:

I have taken the liberty to add this information to the installation instructions on Installation using Debian (.DEB) packages with which I hope to prevent possible future users’ frustration and time needlessly spent.

1 Like

Thanks for improving our doc with that info :+1: