Uploaded image for project: 'JSPWiki'
  1. JSPWiki
  2. JSPWIKI-1051

Startup fails due to jspwiki.log (Permission denied)

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.10.2
    • None
    • None
    • None
    • Ubuntu 16.04, Tomcat8 (system instance)

    Description

      When i follwow the installation instructions the JSPWiki webapp fails to start.

      log4j:WARN No appenders could be found for logger (org.apache.wiki.util.PropertyReader).
      log4j:WARN Please initialize the log4j system properly.
      log4j:WARN See http://logging.apache.org/log4j/1.2/faq.html#noconfig for more info.
      log4j:ERROR setFile(null,true) call failed.
      java.io.FileNotFoundException: jspwiki.log (Permission denied)
              at java.io.FileOutputStream.open0(Native Method)
              at java.io.FileOutputStream.open(FileOutputStream.java:270)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
              at java.io.FileOutputStream.<init>(FileOutputStream.java:133)
              at org.apache.log4j.FileAppender.setFile(FileAppender.java:294)
              at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:207)
              at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:165)
              at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:307)
              at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:172)
              at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:104)
              at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:842)
              at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:768)
              at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:648)
              at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:514)
              at org.apache.log4j.PropertyConfigurator.configure(PropertyConfigurator.java:440)
              at org.apache.wiki.WikiEngine.initialize(WikiEngine.java:464)
              at org.apache.wiki.WikiEngine.<init>(WikiEngine.java:430)
              at org.apache.wiki.WikiEngine.getInstance(WikiEngine.java:370)
              at org.apache.wiki.ui.WikiServletFilter.init(WikiServletFilter.java:82)
              at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
              at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
              at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
              at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4660)
              at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5281)
              at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:147)
              at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:725)
              at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:701)
              at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:717)
              at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:939)
              at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1812)
              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
              at java.util.concurrent.FutureTask.run(FutureTask.java:266)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      

      The current dir of the tomcat is /var/lib/tomcat8. This directory belongs to root and the tomcat user has no write permission.

      I would prefer to have a fallback for this situation, eg. initializing log4j with a simple console appender. So the webapp could startup and the log will be catched by tomcat.

      Attachments

        1. JSPWIKI_1051.patch
          5 kB
          Harry Metske

        Activity

          People

            metskem Harry Metske
            MaikS Maik Scheibler
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: