Today I update by system to Ubuntu 22.04.1 LTS. Since that I did not manage to start my (previously working) xwiki installation.
In cataline.out I find only
[2022-08-29 16:26:31] [crit] One or more listeners failed to start. Full details will be found in the appropriate container log file
[2022-08-29 16:26:31] [crit] Context [/xwiki] startup failed due to previous errors
I tried to find the reason but did not succeed.
How could I try to locate the problem?
Thanks for your support!
Hi,
thanks for the quick reply.
With the logging I get now the following message:
[2022-08-29 18:33:08] [crit] Error configuring application listener of class [org.xwiki.container.servlet.XWikiServletContextListener]
[2022-08-29 18:33:08] [crit] java.lang.UnsupportedClassVersionError: org/xwiki/container/servlet/XWikiServletContextListener has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0 (unable to load class [org.xwiki.container.servlet.XWikiServletContextListener])
If I run apt install default-jre
the result is default-jre ist schon die neueste Version (2:1.11-72build2) (english: latest version is already installed)
Then I assume there’s a conflict with java compiler version. But did you have before upgrading XWiki the JDK 11 installed, or it’s an older version, and you’d updated it also? Please, run the command javac -version. And if the version isn’t 11, so run the following command sudo update-alternatives --config javac and choose the JVM version.
What’s important is the java version used by Tomcat and the logs provided say java 11 (you can have several java version on your system and it doesn’t matter, all that matter is the one used by Tomcat).
Yes, but that’s can raise the problem which java is used by default. For this case (problem) it can also be an error in the environmental variable that’s pointed to the bin folder.
Is the property JAVA_HOME in file /etc/default/tomcat9 commented, and if not which value do you have ?
If you don’t need is for something else, it might be interesting to completely uninstall Java 8 (should be a package that starts with openjdk-8-) to make sure it cannot be used in any way.
It is set with
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64
So this may cause the problem?
javac -version says:
Der Befehl 'javac' wurde nicht gefunden, kann aber installiert werden mit:
apt install default-jdk # version 2:1.11-72build2, or
apt install openjdk-11-jdk-headless # version 11.0.16+8-0ubuntu1~22.04
apt install openjdk-17-jdk-headless # version 17.0.3+7-0ubuntu0.22.04.1
apt install ecj # version 3.16.0-1
apt install openjdk-18-jdk-headless # version 18~36ea-1
apt install openjdk-8-jdk-headless # version 8u312-b07-0ubuntu1
(English: Command was not found)
Seems that since the Ubuntu update something is messed up with my java installation…
Yes, this tells Tomcat to use /usr/lib/jvm/java-8-openjdk-amd64 as JVM, so Java 8. You should change it to Java 11 location (should look like /usr/lib/jvm/java-11-openjdk-amd64/). Commending the property might work too (use the default one) but might be a bit less stable (the default might change into something XWiki does not like).