REST calls return 404 after upgrade to 16.2 with short URL's

Hi there!
Today I upgraded my XWiki from 15.7 to 16.2.0+2 (via apt on Debian 11) and everything went very smooth [edited may 5], except for the fact that I noticed that the livedata application does not work as it is supposed to.

[edited may 5] I now remember there was an issue during the upgrade but I am not sure about the specifics. To my best memory there was an issue about not being able to locate require.js.


  • http-nio-8080-exec-5 -] ERROR .x.i.t.InternalTemplateManager - Error while rendering template [registerinline.vm]
  • org.xwiki.rendering.RenderingException: Failed to execute renderer


  • I cannot upload attachments.
  • Translation rendering does not work properly.
  • The requests for files that are supposed to be fetched by REST return with 404.


With the previous version I made some adjustments so to achieve short url’s. What can I say, I like my url’s short :slight_smile:
So I had my URL’s nice and short for almost a year, everything worked fine in the previous version, did the upgrade to 16.2 and the mentioned issue ensued. Could the adjustments for the short URL’s be the cause of the problem? If so, what can I do to correct this?

The files I adjusted for this are:

  • xwiki.cfg: xwiki.webapppath= (left empty)
  • xwiki.cfg: xwiki.defaultservletpath= (left empty)
  • xwiki.cfg: xwiki.showviewaction=0
  • /etc/xwiki/web.xml: under RESTful API mapping, changed the url-pattern from “/bin/*” to “/*”, like so:
  • /etc/tomcat9/web.xml: under Built In Servlet Mappings, changed the url-pattern from “/bin/*” to “/*”, like above.
  • etc/nginx/sites-available/default: Commented out everything
  • etc/nginx/sites-available/[domain.tld]: Created all neccessary rules in this file, like so:
server {
  listen       80;
  server_name  [domain.tld];
  return 301 $scheme://www.[domain.tld]$request_uri;

server {
  listen       80;
  server_name  www.[domain.tld];

  charset utf-8;

  # Configuration to avoid Request Entity too large error 413
  client_max_body_size 0;
  location /skins {
    alias /usr/lib/xwiki/skins;  

  location /resources/uicomponents {
    alias /usr/lib/xwiki/resources/uicomponents;

  location /resources/js {
    alias /usr/lib/xwiki/resources/js;

  location /resources/css {
    alias /usr/lib/xwiki/resources/css;

  location /resources/icons {
    alias /usr/lib/xwiki/resources/icons;

  location /bin {
    rewrite ^/bin/(.*)$ /$1 permanent;

  location = / {
    return 301 $scheme://$server_name/Main;

  location / {
    # Redirect root and beyond to backend.
    proxy_pass http://localhost:8080/;
    proxy_set_header        X-Real-IP $remote_addr;
    proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;
    proxy_set_header        Host $http_host;
    proxy_set_header        X-Forwarded-Proto $scheme;

Any help is welcome, thanks in advance for any time spent on this silly issue :wink:

For some odd reason I seemed to have posted this in the wrong rubric. I corrected this today by placing it in ‘Help’. Sorry for the inconvenience.

I made a screen grab of the catalina log file.

And the full text of the tomcat9 log since today (rename from .log to .json and open in browser for easier reading):
jp-xwiki-tomcat-json-log.log (607.1 KB)