Upgrade from Xwiki 16.10.2 on Tomcat 9 to XWiki 17.2.0; box running Ubuntu 22.04

Hi! I had a running XWiki 16.10.2 - Tomcat 9 running on an Ubuntu 22.04 box.

Here what I had before trying to update to XWiki 17.2.0:

rjr@e220i057h096l:~$ lsb_release  -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.5 LTS
Release:	22.04
Codename:	jammy
rjr@e220i057h096l:~$ dpkg-query --list | grep xwiki
ii  xwiki-common                                     16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-mysql-common                               16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-tomcat9-common                             16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-tomcat9-mysql                              16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
rjr@e220i057h096l:~$ apt list --upgradable
Listing... Done
xwiki-common/stable 17.2.0 all [upgradable from: 16.10.2]
xwiki-mysql-common/stable 17.2.0 all [upgradable from: 16.10.2]
xwiki-tomcat9-common/stable 16.10.5 all [upgradable from: 16.10.2]
xwiki-tomcat9-mysql/stable 16.10.5 all [upgradable from: 16.10.2]
rjr@e220i057h096l:~$ 

Doing my best to follow the upgrading instructions, I did:

sudo systemctl stop tomcat9
sudo apt remove tomcat9
sudo apt upgrade

Now, I get:

rjr@e220i057h096l:~$ apt list --upgradable
Listing... Done
rjr@e220i057h096l:~$ dpkg-query --list | grep xwiki
ii  xwiki-common                                     17.2.0                                  all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-mysql-common                               17.2.0                                  all          XWiki is a free wiki software platform written in Java with a design emphasis
rc  xwiki-tomcat9-common                             16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
rc  xwiki-tomcat9-mysql                              16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
rjr@e220i057h096l:~$ sudo apt upgrade
[sudo] password for rjr: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  dbconfig-common libtcnative-1 xwiki-common xwiki-mysql-common
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
rjr@e220i057h096l:~$ 

After removing Tomcat9, no updated Tomcat was installed. I’m afraid I misunderstood the instructions. If I try to install xwiki-tomcat10-mariadb or xwiki-tomcat10-common, I get:

rjr@e220i057h096l:~$ sudo apt install xwiki-tomcat10-mariadb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 xwiki-tomcat10-common : Depends: tomcat10 but it is not installable
E: Unable to correct problems, you have held broken packages.
rjr@e220i057h096l:~$ sudo apt install xwiki-tomcat10-common
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 xwiki-tomcat10-common : Depends: tomcat10 but it is not installable
E: Unable to correct problems, you have held broken packages.
rjr@e220i057h096l:~$ 

Must I manually install Tomcat10 and try to install xwiki-tomcat10-common and xwiki-tomcat10-mariadb once I have it working?

Thanks!

This is because there is no tomcat10 package available in Ubuntu 22.04 repositories, according to https://launchpad.net/ubuntu/+source/tomcat10. You will need to upgrade the system too (for example to 24.04 which is the current LTS).

I updated the documentation to make it a bit more obvious that if you uninstall an old package, you need to install the new one (which you eventually tried anyway).

Thanks, Thomas.

As would like to stick with Ubuntu 22.04 by now to avoid issues with other applications running on the concerned box, I installed manually Tomcat 10 as per the instructions available here.

I got a running new Tomcat 10 instance:

[rjr@e220i058h024l ~]$ curl -sL 172.16.57.96:8080 | grep -o -P '(?<=<title>).*(?=</title>)'
Apache Tomcat/10.1.40
[rjr@e220i058h024l ~]$ 

XWiki is not available yet, but I would expect nothing different as there as still missing components and, for sure, fine tune settings.

Following the change you introduced a while ago on Upgrading, I tried:

rjr@e220i057h096l:~$ sudo apt install xwiki-tomcat10-mariadb
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 xwiki-tomcat10-common : Depends: tomcat10 but it is not installable
E: Unable to correct problems, you have held broken packages.
rjr@e220i057h096l:~$ 

Thus, is it no possible to stick with Ubuntu 22.04 to get back an updated to release 17 XWiki instance?

Thanks!

The XWiki Debian xwiki-tomcat10-* packages are designed to expect tomcat10 as a dependency package, so it won’t work.

The alternatives are:

  • move to xjetty packages (so an embedded custom Jetty, instead of a Tomcat dependency)
  • if you want to keep using Tomcat, but you don’t need any fancy new feature, the simplest would probably be to use the lts repository (so XWiki 16.10.x, which is using Tomcat 9) instead of the stable one, until you are ready to move to Ubuntu 24.04 (but the XWiki LTS support will end at the end of the year)
  • install only xwiki-common-mariadb (or some other database flavor) and re-do manually what xwiki-tomcat10-commons does (which is mostly put this file in the right location) so that Tomcat know where XWiki is located
  • of course, you could also use one of the non-debian specific ways of installing XWiki (WAR, Docker)

I will go for these for a number of reasons. I can not update now to Ubuntu 24.04, had issues with the attempts to go for Docker, know the WAR procedure, I prefer to stick with Tomcat as I’m starting to understand something about it! Furthermore, I think I will survive with some help from you! Thanks in advance.

Going that way, am I done with the installation of DEB modules if I see:

rjr@e220i057h096l:~$ mysql -V
mysql  Ver 8.0.41-0ubuntu0.22.04.1 for Linux on x86_64 ((Ubuntu))
rjr@e220i057h096l:~$ dpkg-query --list | grep xwiki
ii  xwiki-common                                     17.2.1                                  all          XWiki is a free wiki software platform written in Java with a design emphasis
ii  xwiki-mysql-common                               17.2.1                                  all          XWiki is a free wiki software platform written in Java with a design emphasis
rc  xwiki-tomcat9-common                             16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis
rc  xwiki-tomcat9-mysql                              16.10.2                                 all          XWiki is a free wiki software platform written in Java with a design emphasis

You talked about xwiki-tomcat10-commons. What about xwiki-tomcat10-mysql?

Thank you very much!

Sorry, I meant xwiki-mariadb-common (there is no such thing as xwiki-common-mariadb).

The main point of xwiki-tomcat10-mysql is to be an entry point triggering the right dependencies when you want both Tomcat 10 (so xwiki-tomcat10-commons) and MySQL (so xwiki-mysql-common).

So in your case, you should only install xwiki-mysql-common (which triggers as dependency xwiki-common), which you probably already have (so I guess it’s more about upgrading it). And then tell the Tomcat 10 you installed by hand where the XWiki application is located.