HTTP Status 404 - Not Found

Hello everony

I did a update from the xWiki Debia 15.10.5 to xWiki 16.2. Then i get the question how Modified configuration file.
-install the package maintainer’s version
-keep the local version currently installed

i tired both option and i get the same problem after.
From the installing everthing looks good so fare, but then i can’t start the main page.

Unbenannt

Has someone a idee, how to solve it?

Many Tanks, Raphasel_L

Which configuration file exactly ? For most XWiki configuration files, you also have the choice to merge (which is generally the best).

You should take a look at the log to get more details. This error suggest that the XWiki application failed to initialize so you should take a look at the very first error in the log.

Thank you for the quick answer.

the xwiki.cfg file, i tried also the “do a 3-way merge” but the same problem
2024-03-25 09_52_14-Window

Where can I find the logs?

Thx

You mean the 3-way merge did not complain, but XWiki won’t start ?

Tomcat 9 log is generally in /var/log/tomcat9/catalina.out.

Yes, the 3 merge runs without error. But after i still HTTP Status 404 - Not Found

2024-04-09 14_01_21-XWiki_Ubuntu 64-bit_Backup20240404 - VMware Workstation

Can you see the problem?

This looks like stop log, not startup.

If you want to be sure, stop tomcat, delete that file and restart.

The startup i have in this screenshot. But it’s says: startup failed due to prevoius error.

2024-04-09 14_11_28-XWiki_Ubuntu 64-bit_Backup20240404 - VMware Workstation

It’s surprising, I always had everything in the same file by default on my side. Maybe check if you have other files related to the xwiki application in /var/log/tomcat9/.

Do i have a look for some special wordings? is there already a problem with stopping the service?
2024-04-09 16_34_35-XWiki_Ubuntu 64-bit_Backup20240404 - VMware Workstation

Also a other file says not that much more…
2024-04-09 16_53_45-XWiki_Ubuntu 64-bit_Backup20240404 - VMware Workstation

Hi there,

I also just updated from wxiki 15 to 16 in our test environment and ran into the same error.

It turns out that tomcat still starts with java version 11 instead of version 17, which was additionally installed during the update.

Take a look at your startup sequence. Your tomcat is also still running version 11:

Java Home: /usr/lib/jvm/java-11-openjdk-amd64
JVM Version: 11.0.22+7-post-Ubuntu-0ubuntu222.04.1

I found this post on stackoverflow on how to get tomcat9 running with java version 17:
https://stackoverflow.com/a/75876914

In short:
purge java 11.
Add new JAVA_HOME to system environment.
Edit /usr/libexec/tomcat9/tomcat-locate-java.sh so tomcat9 recognizes Java versions newer than 11

I found this post while I was looking for a solution. If you have already solved the problem by yourself, it might help others who also encounter the error.

Thank’s a lot for you replay, i have still open this issue.

  1. i Installed Java : apt-get install openjdk-17-jdk
  2. Adding Java Home i couldn’t do. Because i didn’t find "Adding JAVA_HOME : nano /etc/environment
    I have /etc/enviroment.d bit i think this is teh wrong file?

2024-04-18 08_44_38-Window

  1. Updated the script.

But i still have the same issue and it start with the java version 11.
Can you give me more information how to do the point 2?

Thanks a lot!!

I dont know if this work for you, it works for me.

I notice that symbolic link was pointed to java 11
lrwxrwxrwx 1 root root 25 mar 24 2022 default-java → java-1.11.0-openjdk-amd64
lrwxrwxrwx 1 root root 21 ene 20 04:27 java-1.11.0-openjdk-amd64 → java-11-openjdk-amd64
lrwxrwxrwx 1 root root 21 ene 17 05:09 java-1.17.0-openjdk-amd64 → java-17-openjdk-amd64
drwxr-xr-x 9 root root 4096 abr 18 15:30 java-11-openjdk-amd64
drwxr-xr-x 7 root root 4096 abr 18 16:02 java-17-openjdk-amd64
drwxr-xr-x 2 root root 4096 abr 18 15:30 openjdk-11

So i just point the symbolic link to java 17, and that works for me.

I have access to xwiki again.

I use Ubuntu 20.04, but “/etc/environment” should also exist under 22.04.

“environment.d” should be an folder in “/usr/lib/”, containing “99-environment.conf”.
The latter should point to “/etc/environment”

(/usr/lib/environment.d/99-environment.conf -> /etc/environment)

You can try:
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64/
and:
export PATH=$PATH:$JAVA_HOME/bin

Check if this worked with echo $JAVA_HOME.

What does “wich java” and “java --version” output?

Sorry guys, i really do not understand. And i nearly tried erverthing.
I have the echo. But still xWiki starts with java 11.
Which setup i missed? I really appreciate your help

2024-04-19 23_06_18-XWiki_Ubuntu 64-bit_Backup20240404 - VMware Workstation

Maybe you have already set the java variable somewhere else?

Settings in setenv.sh overrides the system variable, I think.
Look at your $CATALINA_BASE/bin and $CATALINA_HOME/bin directories if there is a setenv.sh file.
(In your case: /var/lib/tomcat9/bin/setenv.sh and /usr/share/tomcat/bin/setenv.sh.) Check if “JAVA_HOME” or “JRE_HOME” (or similar) is configured in it. If so, delete it or adjust the path accordingly.

If you need to edit your PATH variable manually, you probable want to add your JAVA_HOME content at the start, so export PATH=$JAVA_HOME/bin:$PATH. The PATH variable is read left-to-right during executable look-up.

I would not recommend to play with links or stuff like core Tomcat scripts as much as possible since they are not designed for this.

On Debian, most customization of Tomcat 9 is supposed to go in /etc/default/tomcat9. Among other things, this file sometime contains an explicit path to the JVM tomcat should use which might be your problem here (you can either try to comment it for Tomcat to use the default JVM or change it to the one you want to use).