AnsweredAssumed Answered

log4j:ERROR setFile(null,true) call failed on Linux

Question asked by manfred99 on Nov 13, 2006
Hi@all!

Tried to install alfresco on a Linux server. During Tomcat startup I got the following error. First, I thought of a permission problem and set Tomcat's log folder temporarily to world-writable. But I am not sure about the correct location.

Any hint is highly appreciated :!:


2006-11-12 17:40:06,192 [main] INFO  org.apache.catalina.core.StandardHostDeployer - Installing web application at context path /alfresco from URL file:/srv/www/tomcat5/base/webapps/alfresco
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: alfresco.log (Permission denied)
   at java.io.FileOutputStream.openAppend(Native Method)
   at java.io.FileOutputStream.<init>(FileOutputStream.java:177)
   at java.io.FileOutputStream.<init>(FileOutputStream.java:102)
   at org.apache.log4j.FileAppender.setFile(FileAppender.java:272)
   at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:151)
   at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:206)
   at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:247)
   at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:123)
   at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:87)
   at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:645)
   at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:603)
   at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:500)
   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:406)
   at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:432)
   at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:460)
   at org.apache.log4j.LogManager.<clinit>(LogManager.java:113)
   at org.apache.log4j.Logger.getLogger(Logger.java:85)
   at org.apache.commons.logging.impl.Log4JLogger.<init>(Log4JLogger.java:102)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
   at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
   at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
   at org.apache.commons.logging.impl.LogFactoryImpl.newInstance(LogFactoryImpl.java:529)
   at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:235)
   at org.apache.commons.logging.impl.LogFactoryImpl.getInstance(LogFactoryImpl.java:209)
   at org.apache.commons.logging.LogFactory.getLog(LogFactory.java:351)
   at org.apache.commons.beanutils.ConvertUtilsBean.<init>(ConvertUtilsBean.java:130)
   at org.apache.commons.beanutils.BeanUtilsBean.<init>(BeanUtilsBean.java:110)
   at org.apache.commons.beanutils.BeanUtilsBean$1.initialValue(BeanUtilsBean.java:68)
   at org.apache.commons.beanutils.ContextClassLoaderLocal.get(ContextClassLoaderLocal.java:80)
   at org.apache.commons.beanutils.BeanUtilsBean.getInstance(BeanUtilsBean.java:78)
   at org.apache.commons.beanutils.ConvertUtilsBean.getInstance(ConvertUtilsBean.java:115)
   at org.apache.commons.beanutils.ConvertUtils.convert(ConvertUtils.java:217)
   at org.apache.commons.digester.CallMethodRule.end(CallMethodRule.java:560)
   at org.apache.commons.digester.Rule.end(Rule.java:230)
   at org.apache.commons.digester.Digester.endElement(Digester.java:1130)
   at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
   at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
   at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
   at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
   at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
   at org.apache.commons.digester.Digester.parse(Digester.java:1647)
   at org.apache.catalina.startup.ContextConfig.defaultConfig(ContextConfig.java:517)
   at org.apache.catalina.startup.ContextConfig.start(ContextConfig.java:626)
   at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:216)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.StandardContext.start(StandardContext.java:4270)
   at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
   at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:807)
   at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
   at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:277)
   at org.apache.catalina.core.StandardHost.install(StandardHost.java:832)
   at org.apache.catalina.startup.HostConfig.deployDirectories(HostConfig.java:701)
   at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:432)
   at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
   at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
   at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
   at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
   at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
   at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
   at org.apache.catalina.core.StandardService.start(StandardService.java:480)
   at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
   at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
   at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
   at java.lang.reflect.Method.invoke(Method.java:585)
   at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
   at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)
log4j:ERROR Either File or DatePattern options are not set for appender [File].
17:40:50,557 ERROR [web.context.ContextLoader] Context initialization failed

Outcomes