Thank you very much for you reply, Juan!
I was find that tomcat on debian running by systemd with
"ProtectSystem-strict" which prohibit to jspwiki do write to directory
which not in list.
On 2021/04/22 16:38:46, Juan Pablo Santos Rodríguez <j...@gmail.com> wrote:
> Hi Alex,>
>
> (apologies for brevity & typos, on mobile)>
>
> Inside the 2nd stacktrace you can see the root cause:>
> java.io.IOException: Page directory is not writable:
/var/lib/jspwiki/pages>
>
> First stacktrace contains a similar error, but for a different folder,>
> please check permissions on those files for the user running JSPWiki.>
>
> Best regards,>
> juan pablo>
>
> El mié., 21 abr. 2021 12:09, Alex Rydzewski <ar...@elyland.net>>
> escribió:>
>
> > Kind times!>
> >>
> > I have the same problems which referenced here>
> > https://www.mail-archive.com/user@jspwiki.apache.org/msg00903.html>
> > with Debian 10, Tomcat9 (9.0.31) installed from distro deb, and
JSPWiki>
> > installed as webapps.>
> >>
> > After deploy JSPWiki.war (2.11.0.M8) I see next.>
> >>
> > With #export CATALINA_OPTS="-log4j.rootCategory=DEBUG,ConsoleLog">
> >>
> > Catalina.out:>
> >>
> > [2021-04-21 11:56:30] [info] Deploying web application archive>
> > [/var/lib/tomcat9/webapps/JSPWiki.war]>
> > [2021-04-21 11:56:31] [info] 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.>
> > [2021-04-21 11:56:32] [info] log4j:WARN No appenders could be found
for>
> > logger (org.apache.wiki.util.PropertyReader).>
> > [2021-04-21 11:56:32] [info] log4j:WARN Please initialize the log4j>
> > system properly.>
> > [2021-04-21 11:56:32] [info] log4j:WARN See>
> > http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,132 [main] INFO>
> > org.apache.wiki.util.PropertyReader - No jspwiki.custom.config
defined>
> > for this context, looking for custom properties file with default
name>
> > of: /jspwiki-custom.properties>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,133 [main] INFO>
> > org.apache.wiki.util.PropertyReader - No custom property file found,>
> > relying on JSPWiki defaults.>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,134 [main] INFO>
> > org.apache.wiki.WikiEngine -
*******************************************>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,134 [main] INFO>
> > org.apache.wiki.WikiEngine - JSPWiki 2.11.0-M8 starting. Whee!>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,137 [main] INFO>
> > org.apache.wiki.WikiEngine - Servlet container: Apache Tomcat/9.0.31>
> > (Debian)>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,137 [main] INFO>
> > org.apache.wiki.WikiEngine - JSPWiki working directory is>
> > '/tmp/JSPWiki-865835113'>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,334 [main] ERROR>
> > org.apache.wiki.pages.DefaultPageManager - An I/O exception occurred>
> > while trying to create a new page provider:>
> > org.apache.wiki.providers.CachingProvider>
> > [2021-04-21 11:56:32] [info] java.io.IOException: Failed to create
page>
> > directory /jspwiki-files , please check property>
> > jspwiki.fileSystemProvider.pageDir>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.wiki.providers.AbstractFileProvider.initialize(AbstractFileProvider.java:125)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.wiki.providers.CachingProvider.initialize(CachingProvider.java:156)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.wiki.pages.DefaultPageManager.<init>(DefaultPageManager.java:131)>
> > [2021-04-21 11:56:32] [info] #011at>
> >
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native>
> >>
> > Method)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)>
> > [2021-04-21 11:56:32] [info] #011at>
> >
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:308)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.initComponent(WikiEngine.java:401)>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,337 [main] FATAL>
> > org.apache.wiki.WikiEngine - JSPWiki could not start, due to an
unknown>
> > exception when starting.>
> > [2021-04-21 11:56:32] [info]
java.lang.reflect.InvocationTargetException>
> > [2021-04-21 11:56:32] [info] #011at>
> >
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native>
> >>
> > Method)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)>
> > [2021-04-21 11:56:32] [info] #011at>
> >
java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:490)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.util.ClassUtil.getMappedObject(ClassUtil.java:308)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.initComponent(WikiEngine.java:401)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.initComponent(WikiEngine.java:393)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.initialize(WikiEngine.java:313)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.<init>(WikiEngine.java:225)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4533)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:717)>
> > [2021-04-21 11:56:32] [info] #011at>
> >
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:690)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.catalina.core.StandardHost.addChild(StandardHost.java:705)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:977)>
> > [2021-04-21 11:56:32] [info] #011at>
> >
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1848)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)>
> > [2021-04-21 11:56:32] [info] #011at>
> > java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)>
> > [2021-04-21 11:56:32] [info] 2021-04-21 11:56:32,343 [main] ERROR>
> > org.apache.wiki.WikiEngine - ERROR: Failed to create a Wiki engine,>
> > stacktrace follows>
> > [2021-04-21 11:56:32] [info]>
> > org.apache.wiki.api.exceptions.WikiException: JSPWiki: Unable to load>
> > and setup properties from jspwiki.properties. Failed to start. Caused>
> > by: null; please check log files for better information.>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.<init>(WikiEngine.java:232)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.WikiEngine.getInstance(WikiEngine.java:183)>
> > [2021-04-21 11:56:32] [info] #011at>
> >
org.apache.wiki.spi.EngineSPIDefaultImpl.find(EngineSPIDefaultImpl.java:41)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.api.spi.EngineDSL.find(EngineDSL.java:65)>
> > [2021-04-21 11:56:32] [info] #011at>
> > org.apache.wiki.ui.WikiServletFilter.init(WikiServletFilter.java:81)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:270)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:251)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102)>
> > [2021-04-21 11:56:32] [info] #011at>
> >>
> >
org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4533)>
> > [2021-04-21 11:56:32] [warning] The web application [JSPWiki]
appears to>
> > have started a thread named [__DEFAULT__] but has failed to stop it.>
> > This is very likely to create a memory leak. Stack trace of thread:>
> > [2021-04-21 11:56:32] [info]>
> > java.base@11.0.9.1/java.lang.Object.wait(Native Method)>
> > [2021-04-21 11:56:32] [info]>
> > java.base@11.0.9.1/java.lang.Object.wait(Object.java:328)>
> > [2021-04-21 11:56:32] [info]>
> > java.base@11.0.9.1/java.util.TimerThread.mainLoop(Timer.java:527)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.TimerThread.mainLoop(Timer.java:527)%5B2021-04-21>>
> > 11:56:32] [info]>
> > java.base@11.0.9.1/java.util.TimerThread.run(Timer.java:506)>
> > [2021-04-21 11:56:32] [warning] The web application [JSPWiki]
appears to>
> > have started a thread named [Statistics Thread-__DEFAULT__-1] but has>
> > failed to stop it. This is very likely to create a memory leak. Stack>
> > trace of thread:>
> > [2021-04-21 11:56:32] [info]>
> > java.base@11.0.9.1/jdk.internal.misc.Unsafe.park(Native Method)>
> > [2021-04-21 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:234)%5B2021-04-21>>
> > 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)%5B2021-04-21>>
> > 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)%5B2021-04-21>>
> > 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)%5B2021-04-21>>
> > 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)%5B2021-04-21>>
> > 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)%5B2021-04-21>>
> > 11:56:32] [info]>
> >>
> >
java.base@11.0.9.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)>
> > [2021-04-21>
> >
<http://java.base@11.0.9.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)%5B2021-04-21>>
> > 11:56:32] [info]>
> > java.base@11.0.9.1/java.lang.Thread.run(Thread.java:834)>
> > [2021-04-21 11:56:32] [info] Deployment of web application archive>
> > [/var/lib/tomcat9/webapps/JSPWiki.war] has finished in [2,265] ms>
> > [2021-04-21 11:56:32] [info] Deploying web application directory>
> > [/var/lib/tomcat9/webapps/ROOT]>
> > [2021-04-21 11:56:32] [info] 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.>
> > [2021-04-21 11:56:32] [info] Deployment of web application directory>
> > [/var/lib/tomcat9/webapps/ROOT] has finished in [426] ms>
> > [2021-04-21 11:56:32] [info] Starting ProtocolHandler
["http-nio-8080"]>
> > [2021-04-21 11:56:32] [info] Server startup in [2,800] milliseconds>
> > [2021-04-21 12:01:32] [info] Illegal access: this web application>
> > instance has been stopped already. Could not load>
> > [java.lang.OutOfMemoryError]. The following stack trace is thrown for>
> > debugging purposes as well as to attempt to terminate the thread
which>
> > caused the illegal access.>
> > [2021-04-21 12:01:32] [info] java.lang.IllegalStateException: Illegal>
> > access: this web application instance has been stopped already. Could>
> > not load [java.lang.OutOfMemoryError]. The following stack trace is>
> > thrown for debugging purposes as well as to attempt to terminate the>
> > thread which caused the illegal access.>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1385)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1373)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1226)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
net.sf.ehcache.util.concurrent.ConcurrentHashMap.values(ConcurrentHashMap.java:2722)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
net.sf.ehcache.util.concurrent.ConcurrentHashMap.values(ConcurrentHashMap.java:220)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
net.sf.ehcache.statistics.extended.ExtendedStatisticsImpl$1.run(ExtendedStatisticsImpl.java:104)>
> > [2021-04-21 12:01:32] [info] at>
> >>
> >
java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)>
> > [2021-04-21 12:01:32] [info] at>
> >
java.base/java.util.concurrent.FutureTask.runAndReset(FutureTask.java:305)>
> >>
> > That is the roadmap>
> > https://jspwiki-wiki.apache.org/Wiki.jsp?page=Getting%20Started
does not>
> > work>
> >>
> > So next. If I create /var/lib/tomcat9/lib/jspwiki-custom.properties>
> >>
> > # cat /var/lib/tomcat9/lib/jspwiki-custom.properties>
> > jspwiki.policy.file=jspwiki-custom.policy>
> > #jspwiki.filterConfig = /usr/local/tomcat/lib/filters.xml>
> > #jspwiki.xmlGroupDatabaseFile=/usr/local/tomcat/lib/groupdatabase.xml>
> > #jspwiki.xmlUserDatabaseFile=/usr/local/tomcat/lib/userdatabase.xml>
> > jspwiki.applicationName = wiki>
> > jspwiki.pageProvider = VersioningFileProvider>
> > jspwiki.fileSystemProvider.pageDir = /var/lib/jspwiki/pages>
> > jspwiki.basicAttachmentProvider.storageDir = /var/lib/jspwiki/pages>
> >>
> > log4j.rootLogger=INFO, FileLog>
> > log4j.appender.FileLog = org.apache.log4j.RollingFileAppender>
> > log4j.appender.FileLog.MaxFileSize = 10MB>
> > log4j.appender.FileLog.MaxBackupIndex = 14>
> > l
[message truncated...]
--
З найкращими побажаннями, |With best regards,
Олександр Ридзевський |Alexander Rydzewski