Attachment maximum filesize 0 bytes

Good evening,
I am busy adding content to my wiki and I am having a little trouble uploading an attachment. Each time I try to upload an attachment to a page I get the error:
File [filename.png] is too large. Max file size: 0 bytes

Can someone give me a clue as to what is going on?
XWiki version 14.10.3
Debian 11
Standard install via DEB package (Tomcat9, MariaDB)

Thanks in advance

Hello @Jan-Paul-Kleijn,

Some information that could help figuring out the issue:

  • Do you see errors in your server logs?
  • Do you see errors in your browser debug console?
  • Do you know if an attachment size restriction has been set (to 0) on the page or one of its parents (see)

Also, is the message you reported the exact message display in the error notification?
The expected message format is File filename.png is too large (92.41Kb). Max file size: 0 bytes. on 14.10.3.

Could you also clean you browser cache and try again? If this fixes the issue, let us know as it shouldn’t be required but it happen to be the case from time to time.

Yes (a lot of errors), yes (as I remember quite some CRSF errors) and no restriction set (left empty) :slight_smile:

The message I gave is conform the format you stated, I just left out the filesize mentioned between parentheses.

I have cleaned my browser cache and tried again but this did not fix the issue.

I did however set the memory for java at the size proposed on the page with the instructions for installation through DEB packages.

BUT (always a but… :slight_smile: )
Bigger issue now is that suddenly Tomcat9 won’t start up anymore.

This is my Tomcat9 status at the moment:

● tomcat9.service - Apache Tomcat 9 Web Application Server
     Loaded: loaded (/lib/systemd/system/tomcat9.service; enabled; vendor preset: enabled)
    Drop-In: /etc/systemd/system/tomcat9.service.d
             └─xwiki-tomcat9-systemd.conf
     Active: failed (Result: exit-code) since Wed 2023-01-18 14:36:54 CET; 10min ago
       Docs: https://tomcat.apache.org/tomcat-9.0-doc/index.html
    Process: 436 ExecStartPre=/usr/libexec/tomcat9/tomcat-update-policy.sh (code=exited, status=0/SUCCESS)
    Process: 449 ExecStart=/bin/sh /usr/libexec/tomcat9/tomcat-start.sh (code=exited, status=127)
   Main PID: 449 (code=exited, status=127)
        CPU: 24ms

Jan 18 14:36:54 xwiki systemd[1]: Starting Apache Tomcat 9 Web Application Server...
Jan 18 14:36:54 xwiki systemd[1]: Started Apache Tomcat 9 Web Application Server.
Jan 18 14:36:54 xwiki tomcat9[449]: [75B blob data]
Jan 18 14:36:54 xwiki systemd[1]: tomcat9.service: Main process exited, code=exited, status=127/n/a
Jan 18 14:36:54 xwiki systemd[1]: tomcat9.service: Failed with result 'exit-code'.

I really don’t understand why this is happening suddenly. I am not able to fix it either.
This is my last catalina.log entry (timepoint 14:14:28):

18-Jan-2023 14:14:27.711 INFO [Thread-14] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
18-Jan-2023 14:14:27.723 INFO [Thread-14] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
18-Jan-2023 14:14:27.748 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
		at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2257)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1626)
		at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
		at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5469)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:498)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:982)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.startup.Catalina.stop(Catalina.java:849)
		at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:996)
18-Jan-2023 14:14:28.113 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:14:28.113 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:14:28.114 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
18-Jan-2023 14:14:28.115 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
18-Jan-2023 14:14:28.116 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-15-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
 java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
18-Jan-2023 14:14:28.117 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-21-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
 java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
18-Jan-2023 14:14:28.118 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-27-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
 java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
18-Jan-2023 14:14:28.119 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
		at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2257)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1626)
		at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
		at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5469)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:498)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:982)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.startup.Catalina.stop(Catalina.java:849)
		at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:996)
18-Jan-2023 14:14:28.120 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@79226d]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
18-Jan-2023 14:14:28.146 INFO [Thread-14] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
18-Jan-2023 14:14:28.185 INFO [Thread-14] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]

I am really at a loss here

It seems I cannot stop Tomcat9 either. Server restart does not help.

The error message that keeps coming back is:

[2023-01-18 14:14:28] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:16:22] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:18:53] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:23:54] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:25:16] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:32:03] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:36:54] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 15:06:34] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 17:35:34] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found

Can I consider my work lost and start all over again with a new server and a new install of XWiki?

Can it be a problem with the ownership of the file /etc/default/tomcat9? Currently the ownership is as follows:

# ls -l /etc/default/tomcat9
-rw-r--r-- 1 root root 1050 Jan 18 17:40 /etc/default/tomcat9

Here is a concise version of my Catalina.out of today

[2023-01-18 02:43:50] [info] 2023-01-18 02:43:50,447 [extension.index job group daemon thread - org.xwiki.extension.index.internal.job.ExtensionIndexJob@5d34aae5([extension, index])] WARN  o.x.e.i.i.j.ExtensionIndexJob  - Failed to get remote extension from repository [store.xwiki.com:xwiki:https://store.xwiki.com/xwiki/rest]: UnknownHostException: store.xwiki.com: Temporary failure in name resolution
[2023-01-18 02:43:50] [info] 2023-01-18 02:43:50,461 [extension.index job group daemon thread - org.xwiki.extension.index.internal.job.ExtensionIndexJob@5d34aae5([extension, index])] WARN  o.x.e.i.i.j.ExtensionIndexJob  - Failed to get remote extension from repository [extensions.xwiki.org:xwiki:https://extensions.xwiki.org/xwiki/rest]: UnknownHostException: extensions.xwiki.org: Temporary failure in name resolution
[2023-01-18 13:55:34] [info] Pausing ProtocolHandler ["http-nio-8080"]
[2023-01-18 13:55:34] [info] Stopping service [Catalina]
[2023-01-18 13:55:34] [warning] Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
[2023-01-18 13:55:34] [warning] java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
...
[2023-01-18 13:55:34] [warning] The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2023-01-18 13:55:34] [warning] The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2023-01-18 13:55:34] [warning] The web application [xwiki] registered the JDBC driver [org.mariadb.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2023-01-18 13:55:34] [warning] The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
...
The above, x 33
...
[2023-01-18 13:55:34] [warning] Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
[2023-01-18 13:55:34] [warning] java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
[2023-01-18 13:55:34] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
...
The above, x 28
...
[2023-01-18 13:55:34] [crit] The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@b421f2]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
...
The above, x 76
...
[2023-01-18 13:55:36] [warning] The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored
[2023-01-18 14:11:36] [warning] The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored
[2023-01-18 14:14:27] [warning] Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
[2023-01-18 14:14:27] [warning] java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
[2023-01-18 14:14:27] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
...
The above, x 28
...
[2023-01-18 14:14:28] [warning] The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2023-01-18 14:14:28] [warning] The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
[2023-01-18 14:14:28] [warning] The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
[2023-01-18 14:14:28] [warning] The web application [xwiki] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
[2023-01-18 14:14:28] [warning] The web application [xwiki] appears to have started a thread named [searcherExecutor-21-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
[2023-01-18 14:14:28] [warning] The web application [xwiki] appears to have started a thread named [searcherExecutor-27-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
[2023-01-18 14:14:28] [warning] Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
[2023-01-18 14:14:28] [warning] java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
[2023-01-18 14:14:28] [warning]     at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
...
The above, x 28
...
[2023-01-18 14:14:28] [crit] The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@79226d]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
[2023-01-18 14:14:28] [info] Stopping ProtocolHandler ["http-nio-8080"]
[2023-01-18 14:14:28] [info] Destroying ProtocolHandler ["http-nio-8080"]
[2023-01-18 14:14:28] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:16:22] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:18:53] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:23:54] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:25:16] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:32:03] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 14:36:54] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 15:06:34] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found
[2023-01-18 17:35:34] [info] /usr/libexec/tomcat9/tomcat-start.sh: 5: /etc/default/tomcat9: #015: not found

And here is a concise version of my Catalina log from 2023-01-18:

18-Jan-2023 13:55:34.026 INFO [Thread-14] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
18-Jan-2023 13:55:34.039 INFO [Thread-14] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
18-Jan-2023 13:55:34.065 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
		at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
...
As above, x 27
18-Jan-2023 13:55:34.193 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 13:55:34.194 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 13:55:34.194 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.mariadb.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 13:55:34.195 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.196 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.197 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [expiration-thread--p5-t1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.199 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [h2sc-6-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.200 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [Connection evictor] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.201 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [Connection evictor] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.202 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [h2sc-8-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.203 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [SolrRrdBackendFactory-11-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.204 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [MetricsHistoryHandler-12-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.205 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [Thread-4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.206 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-15-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.207 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [Asynchronous handler for event store [solr]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.208 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-21-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.209 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [Asynchronous handler for event store [legacy]] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.209 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [timeout-thread--p4-t1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.211 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-27-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.212 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [XWiki's extension job history saving thread] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.213 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [SolrRrdBackendFactory-11-thread-2] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.214 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.214 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t4] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.215 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t5] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.217 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t6] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.218 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t7] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.219 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t8] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.220 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t9] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.221 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t10] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.222 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t11] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.223 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t12] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.224 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t13] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.225 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t14] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.226 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t15] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.227 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [non-blocking-thread--p2-t16] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.228 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [blocking-thread--p3-t1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 13:55:34.228 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
...
18-Jan-2023 13:55:34.229 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@b421f2]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
...
As above, times 80 or so.
...
18-Jan-2023 13:55:36.134 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored
18-Jan-2023 14:11:08.011 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
18-Jan-2023 14:11:08.435 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:11:08.436 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:11:08.436 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.mariadb.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:11:08.437 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:11:08.438 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:11:08.439 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-15-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:11:08.440 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-21-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:11:08.441 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-27-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:11:08.441 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
18-Jan-2023 14:11:08.443 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@15bae50e]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
18-Jan-2023 14:11:08.444 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@692b5050]) and a value of type [org.restlet.ext.jaxrs.internal.core.MatchedInfo] (value [org.restlet.ext.jaxrs.internal.core.MatchedInfo@5f1c757e]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
18-Jan-2023 14:11:08.445 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@635a17ad]) and a value of type [com.google.javascript.jscomp.Tracer.ThreadTrace] (value []) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
...
As above, x 30 or so.
...
18-Jan-2023 14:14:27.748 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
18-Jan-2023 14:14:28.113 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:14:28.113 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
18-Jan-2023 14:14:28.114 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:14:28.115 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:14:28.116 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-15-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:14:28.117 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-21-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:14:28.118 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-27-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
18-Jan-2023 14:14:28.119 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
18-Jan-2023 14:14:28.120 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@79226d]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
18-Jan-2023 14:14:28.146 INFO [Thread-14] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
18-Jan-2023 14:14:28.185 INFO [Thread-14] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]

Sorry for the long log file dump. I really hope someone can help me here.
For the record, this is a fresh install of XWiki (via DEB packages) on a fresh Debian 11 VPS. The only change I made is the memory setting (JAVA_OPTS="-Djava.awt.headless=true -Xmx1024m") in /etc/default/tomcat9.

No, looks good (and I have exactly the same thing). What’s important is that Tomcat can read it, there is no reason for it to be able to edit it.

Would be interesting to see your Tomcat init log up until at least the very first error, what you pasted seems to be after a while.

1 Like

The error message #015: not found seems to indicate that you have a control character in line 5 of your /etc/default/tomcat9 . Please check that line and remove the control character there; afterwards tomcat should start again (or at least show a different error message).

Minor comments: I think you can remove the -Xmx1024m option to the JAVA_OPTS - unless you are really short on RAM and do not want to give the tomcat a bit more of it.

This is unlikely to fix the issue, but having more RAM might help as tomcat might behave a bit weird when running short of memory (then an empty wiki should be able to run with 1024MB RAM; I have my development instances often running at 512M.

The java.lang.ClassCastException is unfortunately something “normal”; an object in the session scope is not serializeable, making writing and loading the session data between restarts fail.

1 Like

Clemens, you made me look more thorough at this particular issue. I already checked it but could for the life of me not see any issue. BUT(!) The problem was that I inadvertantly set nano to save files in DOS format, thus saving files with \r\n on the end of each line. The first uncommented (empty) line was where the problem started. I unset the DOS format saving mode with pressing alt+D and saved the file again. Voila, Tomcat started normally again.

Perhaps my desperation clouded my ability to focus properly on the problem.

About your comment, I removed the Xmx1024m option because I am really not short on RAM. Thanks for the advice and for pointing me in the right direction, it was your remark about a control character that made me look harder.

And also thanks to Manuel and Thomas for having a look.

Now the issue of the attachments (the original issue) remains. Luckily, as I scroll through the commands, I see that I have not edited any other files.

I see however that in the tomcat status a notification comes up:

The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored

PS - I have not done anything to achieve short(er) URL’s, this is a clean install on a clean VPS. But if you would like to check, ask me for anything you need.

You can now answer my questions from above :slight_smile:

About errors in my server logs, it appears there are no errors logged when I try to upload an attachment. I tried an upload at approx. 16:45 today (19-1-2023). Here is the last momentary instance of the error log.

19-Jan-2023 13:53:31.108 INFO [Thread-14] org.apache.coyote.AbstractProtocol.pause Pausing ProtocolHandler ["http-nio-8080"]
19-Jan-2023 13:53:31.118 INFO [Thread-14] org.apache.catalina.core.StandardService.stopInternal Stopping service [Catalina]
19-Jan-2023 13:53:31.141 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [ROOT]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
		at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2257)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1626)
		at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
		at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5469)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:498)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:982)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.startup.Catalina.stop(Catalina.java:849)
		at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:996)
19-Jan-2023 13:53:31.438 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.calcite.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
19-Jan-2023 13:53:31.438 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [xwiki] registered the JDBC driver [org.apache.solr.handler.sql.CalciteSolrDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered.
19-Jan-2023 13:53:31.439 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxSchedulerPurge-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
19-Jan-2023 13:53:31.440 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [RxCachedWorkerPoolEvictor-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
 java.base@11.0.16/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
19-Jan-2023 13:53:31.441 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-15-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
 java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
19-Jan-2023 13:53:31.442 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-21-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
 java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
19-Jan-2023 13:53:31.444 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesThreads The web application [xwiki] appears to have started a thread named [searcherExecutor-27-thread-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
 java.base@11.0.16/jdk.internal.misc.Unsafe.park(Native Method)
 java.base@11.0.16/java.util.concurrent.locks.LockSupport.park(LockSupport.java:194)
 java.base@11.0.16/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2081)
 java.base@11.0.16/java.util.concurrent.LinkedBlockingQueue.take(LinkedBlockingQueue.java:433)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
 java.base@11.0.16/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
 java.base@11.0.16/java.lang.Thread.run(Thread.java:829)
19-Jan-2023 13:53:31.444 WARNING [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches Failed to clear soft references from ObjectStreamClass$Caches for web application [xwiki]
	java.lang.ClassCastException: class java.io.ObjectStreamClass$Caches$1 cannot be cast to class java.util.Map (java.io.ObjectStreamClass$Caches$1 and java.util.Map are in module java.base of loader 'bootstrap')
		at org.apache.catalina.loader.WebappClassLoaderBase.clearCache(WebappClassLoaderBase.java:2282)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesObjectStreamClassCaches(WebappClassLoaderBase.java:2257)
		at org.apache.catalina.loader.WebappClassLoaderBase.clearReferences(WebappClassLoaderBase.java:1626)
		at org.apache.catalina.loader.WebappClassLoaderBase.stop(WebappClassLoaderBase.java:1554)
		at org.apache.catalina.loader.WebappLoader.stopInternal(WebappLoader.java:461)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5469)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1400)
		at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1389)
		at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
		at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
		at java.base/java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:140)
		at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:976)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:498)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:982)
		at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257)
		at org.apache.catalina.startup.Catalina.stop(Catalina.java:849)
		at org.apache.catalina.startup.Catalina$CatalinaShutdownHook.run(Catalina.java:996)
19-Jan-2023 13:53:31.446 SEVERE [Thread-14] org.apache.catalina.loader.WebappClassLoaderBase.checkThreadLocalMapForLeaks The web application [xwiki] created a ThreadLocal with key of type [java.lang.ThreadLocal] (value [java.lang.ThreadLocal@774dd7eb]) and a value of type [org.codehaus.plexus.classworlds.realm.ClassRealm] (value [ClassRealm[plexus.core, parent: null]]) but failed to remove it when the web application was stopped. Threads are going to be renewed over time to try and avoid a probable memory leak.
19-Jan-2023 13:53:31.472 INFO [Thread-14] org.apache.coyote.AbstractProtocol.stop Stopping ProtocolHandler ["http-nio-8080"]
19-Jan-2023 13:53:31.530 INFO [Thread-14] org.apache.coyote.AbstractProtocol.destroy Destroying ProtocolHandler ["http-nio-8080"]
19-Jan-2023 13:53:32.245 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version name:   Apache Tomcat/9.0.43 (Debian)
19-Jan-2023 13:53:32.246 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server built:          Jan 8 1970 01:02:06 UTC
19-Jan-2023 13:53:32.246 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Server version number: 9.0.43.0
19-Jan-2023 13:53:32.247 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Name:               Linux
19-Jan-2023 13:53:32.247 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log OS Version:            5.10.0-20-amd64
19-Jan-2023 13:53:32.247 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Architecture:          amd64
19-Jan-2023 13:53:32.247 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Java Home:             /usr/lib/jvm/java-11-openjdk-amd64
19-Jan-2023 13:53:32.247 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Version:           11.0.16+8-post-Debian-1deb11u1
19-Jan-2023 13:53:32.248 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log JVM Vendor:            Debian
19-Jan-2023 13:53:32.248 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_BASE:         /var/lib/tomcat9
19-Jan-2023 13:53:32.248 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log CATALINA_HOME:         /usr/share/tomcat9
19-Jan-2023 13:53:32.268 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.lang=ALL-UNNAMED
19-Jan-2023 13:53:32.268 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.io=ALL-UNNAMED
19-Jan-2023 13:53:32.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util=ALL-UNNAMED
19-Jan-2023 13:53:32.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.base/java.util.concurrent=ALL-UNNAMED
19-Jan-2023 13:53:32.269 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: --add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED
19-Jan-2023 13:53:32.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.config.file=/var/lib/tomcat9/conf/logging.properties
19-Jan-2023 13:53:32.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager
19-Jan-2023 13:53:32.270 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.awt.headless=true
19-Jan-2023 13:53:32.271 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djdk.tls.ephemeralDHKeySize=2048
19-Jan-2023 13:53:32.271 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.protocol.handler.pkgs=org.apache.catalina.webresources
19-Jan-2023 13:53:32.271 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dorg.apache.catalina.security.SecurityListener.UMASK=0027
19-Jan-2023 13:53:32.271 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dignore.endorsed.dirs=
19-Jan-2023 13:53:32.271 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.base=/var/lib/tomcat9
19-Jan-2023 13:53:32.272 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Dcatalina.home=/usr/share/tomcat9
19-Jan-2023 13:53:32.272 INFO [main] org.apache.catalina.startup.VersionLoggerListener.log Command line argument: -Djava.io.tmpdir=/tmp
19-Jan-2023 13:53:32.278 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent Loaded Apache Tomcat Native library [1.2.26] using APR version [1.7.0].
19-Jan-2023 13:53:32.278 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true].
19-Jan-2023 13:53:32.278 INFO [main] org.apache.catalina.core.AprLifecycleListener.lifecycleEvent APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true]
19-Jan-2023 13:53:32.282 INFO [main] org.apache.catalina.core.AprLifecycleListener.initializeSSL OpenSSL successfully initialized [OpenSSL 1.1.1n  15 Mar 2022]
19-Jan-2023 13:53:32.787 INFO [main] org.apache.coyote.AbstractProtocol.init Initializing ProtocolHandler ["http-nio-8080"]
19-Jan-2023 13:53:32.833 INFO [main] org.apache.catalina.startup.Catalina.load Server initialization in [881] milliseconds
19-Jan-2023 13:53:32.938 INFO [main] org.apache.catalina.core.StandardService.startInternal Starting service [Catalina]
19-Jan-2023 13:53:32.938 INFO [main] org.apache.catalina.core.StandardEngine.startInternal Starting Servlet engine: [Apache Tomcat/9.0.43 (Debian)]
19-Jan-2023 13:53:32.953 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deploying deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml]
19-Jan-2023 13:53:32.983 WARNING [main] org.apache.catalina.startup.HostConfig.deployDescriptor The path attribute with value [/xwiki] in deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has been ignored
19-Jan-2023 13:53:58.929 INFO [main] org.apache.catalina.startup.HostConfig.deployDescriptor Deployment of deployment descriptor [/etc/tomcat9/Catalina/localhost/xwiki.xml] has finished in [25,975] ms
19-Jan-2023 13:53:58.930 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deploying web application directory [/var/lib/tomcat9/webapps/ROOT]
19-Jan-2023 13:54:00.036 INFO [main] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time.
19-Jan-2023 13:54:00.041 INFO [main] org.apache.catalina.startup.HostConfig.deployDirectory Deployment of web application directory [/var/lib/tomcat9/webapps/ROOT] has finished in [1,110] ms
19-Jan-2023 13:54:00.046 INFO [main] org.apache.coyote.AbstractProtocol.start Starting ProtocolHandler ["http-nio-8080"]
19-Jan-2023 13:54:00.060 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in [27226] milliseconds

About errors in the browser debug console. I tried Firefox and Chrome, both returned the same errors in the console.

jquery-migrate.min.js?r=1:2 JQMIGRATE: Migrate is installed with logging active, version 3.3.2
jquery-migrate.min.js?r=1:2 JQMIGRATE: jQuery.fn.click() event shorthand is deprecated
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 console.trace
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 JQMIGRATE: jQuery.fn.submit() event shorthand is deprecated
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 console.trace
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 JQMIGRATE: jQuery.isFunction() is deprecated
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 console.trace
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 JQMIGRATE: jQuery.isArray is deprecated; use Array.isArray
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 console.trace
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 JQMIGRATE: jQuery.trim is deprecated; use String.prototype.trim
u @ jquery-migrate.min.js?r=1:2
jquery-migrate.min.js?r=1:2 console.trace
u @ jquery-migrate.min.js?r=1:2
DevTools failed to load source map: Could not load content for http://www.homeoworld.org:8080/xwiki/webjars/wiki%3Axwiki/momentjs/2.29.1/min/moment.min.js.map: HTTP error: status code 404, net::ERR_HTTP_RESPONSE_CODE_FAILURE

About the attachment size restriction. The attachment maximum upload size field is empty. Note that this restriction is viewed in /xwiki/bin/edit/XWiki/XWikiPreferences?editor=object. I do not know how to view or set this at page level, perhaps you can help me with this.

The message is:

File LMHI2023_small.png is too large (75.31Kb). Max file size: 0 bytes.

I have cleaned my browser cache and tried again. But in both browsers it did not solve the issue.

I suspect that the XWiki.WXWikiPreferences have been lost and got recreated.
These store beside others a value for the maximal size of files that XWiki allows to opload.
May I shamelessly propose trying to install the extension:

Maximal Upload Size Admin UI (XWiki.org)

to check if that value is different from 0 ?

1 Like

Yes, you may :grin:

I have installed your extension and I notice that the value in the formfield is set empty, just like in the object editor formfield.

xwiki_upload

I guess you can type in a moderately insane value like 42949672960 (should be 40G), or any smaller value if you prefer. That should fix the upload problem.

2 Likes

I changed the value in your handy extension to 125829120 (120MB) and it solved the issue. Thanks!
I still find it quite strange that the default value of 100GB was not used. But I will leave this in the hands of people who know more about this than I do. I have a wiki to fill.

I am moderately sure that the XWiki.XWikiPreferences page was either removed by some accident (you should find it in the page index under “Deleted Pages”) or it has not been there in the first place (i.e. the distribution wizard did not show up on the first time the wiki was accessed). In the latter case the UI should look rather incomplete, and as you have a working Wiki Administration, I guess the first one is what happened.

I am not sure how the XWiki.XWikiPreferences got deleted, as it should be a “hidden” technical page - some people remove it as they do not know what it is when they enable the display of hidden pages in their user profile. (Also I have no idea how to restore the version from the recycle bin, as this page gets automatically recreated if missing the next time it is needed.)
Anyway, in case you remember that you have deleted a page with that name you now know about the results of doing so. :wink:

Perhaps the XWiki.XWikiPreferences page was removed during setup. What happened namely is when I installed XWiki (with the DEB packages), the installer eventually reached the page where I was given the choice to install a XWiki flavor. The problem however was that there was not any flavor for me to choose from, not even the Default flavor. So I chose for the option ‘install flavor later’ (I paraphrase here).
That left me with a completely ‘nude’ XWiki, without even an Wiki Administration. So I restarted Tomcat9 and reinitialized XWiki. Then the distribution wizard came up again. I was left with the options to either ‘install flavor later’ or ‘install no flavor’ because, again, there was no flavor to choose. This time I chose ‘install no flavor’ because I knew that the other option would leave me in the same place as before, with a ‘nude’ XWiki.
After choosing ‘install no flavor’ somehow I got the option to install extensions myself and I chose to install the XWiki Administration application extension. After I installed the XWiki Administration application extension I chose to return to the Distribution Wizard page which has the option of choosing the XWiki flavor. To my surprise I saw that a flavor had appeared in the list, the Default flavor. But as I already installed a Wiki Administration I wanted to see what a ‘almost nude’ XWiki would look like, maybe I would stick with it. So I chose for the option ‘install flavor later’ to see what XWiki would look like.
The ‘almost nude’ XWiki indeed was now provided with an administration, though a very limited version of it. After a while I convinced myself that this was not the result I was looking for and chose to reinitalize XWiki again by restarting Tomcat.
After reinitializing XWiki the Distribution Wizard came up again. At the page where I could choose the XWiki flavor I chose for ‘no flavor’, then I chose to not go forward with an XWiki with no flavor and return to the page where I could choose the XWiki flavor. Again the Default flavor was added to the list now (as the only option) and I chose to install the Default XWiki flavor.
During the install of the Default XWiki flavor a notification came up about an issue with the Administration Application extension I had installed previously. I chose for the option to repair it and the choices I was given next I left at what was indicated by default. The Administration application was repaired and everything else went smoothly. So I assumed that now I had a proper install of the Default XWiki flavor, hence my remark that I had a clean install of XWiki. No short URL, no extra memory, no token set (left at default tititi/tototo etc.), no proxy, no domain name set.
When I explored XWiki I saw that all bells and whistles were nicely installed and working properly. So I went right to work and started filling the wiki, adding multilangual pages and setting it up properly.
After a while I installed the blog extension because I thought it would be a good addition for my wiki. This also went smooth and I started filling the blog and setting it up as I wanted to. But when I reached to the point of adding an image for a blog page I ran into the ‘attachment maximum filesize 0 bytes’ issue. I tried to look in the Administration page (not the object editor though) for possible limits set or whatever but I could not find anything. So I thought it would be best to start this topic and ask the XWiki help team about what to do to solve it.
During answering the initial response of Manuel I thought that maybe the issue could be solved if I set the memory to 1024m as instructed on the installation manual page. It is probably there when I inadvertently set the nano save mode to DOS mode. And then I had a lot of errors.

I thought I would tell you the whole saga here because it could possibly be of use for the developers. I tried my utmost to be as specific as my memory permits it but overall I must say I am pleasantly surprised at how well my memory still works :wink:.

1 Like

It seems you’ve hit the following bug: Loading...

That problem with the missing flavor sounds familiar to me, too. I get it at random on fresh installs and reloading the page fixes the issue usually. I guess it is somewhat counter intuitive to refresh the page while an install is in progress, but as the Distribution Wizard stores its state on the server side, it is completely safe to do so.

After the rudimentary UI allows you to install the bare Admin-UI, the XWikiProperties page is created “empty”, and because this is a “configuration page”, it is not overwritten by later installs, leaving you with empty settings for the wiki. That step might need some improvements to have some minimal requires settings in cases where one wants a “clean, empty” setup, but currently I have no idea how to improve it.

1 Like

IMO what we need to do:

  • Fix the refresh bug
  • Remove/hide the empty wiki option since this really shouldn’t be used
1 Like