Update question

I want to update XWIKI from 15.10.12 to 16.10.x
The system is Debian 11 with tomcat9
I upgraded Java 11 to Java 17 with is the default Java version.
wit apt update && apt upgrade I made the normal update also of XWIKI

But where do I now tell xwiki to use the right Java version ?

And how is the process with a Debian upgrade from 11 to 12 and then with tomcat 10?

regards
Heribert

That’s not something to tell XWiki, but Tomcat. These day I think Tomcat uses the default JVM by default, but I remember seeing it setting it automatically in /etc/default/tomcat9 (during first install probably). You will probably need to update JAVA_HOME in that file (I think commenting it makes Tomcat use whatever is the default Java version).

https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HUpgrading should cover the Tomcat version upgrade.

I was able to fix JAVA_HOME in /etc/default/tomcat9
so the upgrade with Java 17

but going further to debian 12 (bookworm)
foloowing: https://www.xwiki.org/xwiki/bin/view/Documentation/AdminGuide/Installation/InstallationViaAPT/#HUpgrading
it turns out that
sudo apt install xwiki-tomcat10-mariadb
doe not work, because xwiki with tomcat 10 is not availabe in the repo
deb http://maven.xwiki.org /lts

Tomcat 9 vs Tomcat 10 is a special case. Most Java Servlet applications either work with Tomcat 9 or Tomcat 10, but not both, because there were big breaking changes in the Java Servlet world.

The current LTS is 16.10.x, and 16.10.x only support up to Tomcat 9. The LTS branch will jump to 17.10.x next month, in which case you will require at least Tomcat 10. In the meantime, you could:

  • stay on Debian 11 until 17.10.2 is out
  • move to the stable Debian repository (so upgrade to the soon-to-be LTS 17.10.0)
  • move to XJetty packages, which are a lot less linked to the Debian version than Tomcat