error-log4j:ERROR setFile(null,true) call failed.

问题描述

log4j:ERROR setFile(null,true) call failed.

用的是eclipse。
log4j:ERROR setFile(null,true) call failed.
java.io.FileNotFoundException: consoleldap.log (拒绝访问。)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.(Unknown Source)
at java.io.FileOutputStream.(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
at org.apache.log4j.DailyRollingFileAppender.activateOptions(DailyRollingFileAppender.java:215)
at org.apache.log4j.config.PropertySetter.activate(PropertySetter.java:256)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:132)
at org.apache.log4j.config.PropertySetter.setProperties(PropertySetter.java:96)
at org.apache.log4j.PropertyConfigurator.parseAppender(PropertyConfigurator.java:654)
at org.apache.log4j.PropertyConfigurator.parseCategory(PropertyConfigurator.java:612)
at org.apache.log4j.PropertyConfigurator.configureRootCategory(PropertyConfigurator.java:509)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:415)
at org.apache.log4j.PropertyConfigurator.doConfigure(PropertyConfigurator.java:441)
at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:468)
at org.apache.log4j.LogManager.(LogManager.java:122)
at org.apache.log4j.Logger.getLogger(Logger.java:104)
at org.apache.commons.logging.impl.Log4JLogger.getLogger(Log4JLogger.java:229)
at org.apache.commons.logging.impl.Log4JLogger.(Log4JLogger.java:65)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
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 com.opensymphony.xwork2.util.logging.commons.CommonsLoggerFactory.getLoggerImpl(CommonsLoggerFactory.java:18)
at com.opensymphony.xwork2.util.logging.LoggerFactory.getLogger(LoggerFactory.java:31)
at org.apache.struts2.dispatcher.ActionContextCleanUp.(ActionContextCleanUp.java:74)
at sun.misc.Unsafe.ensureClassInitialized(Native Method)
at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(Unknown Source)
at sun.reflect.ReflectionFactory.newFieldAccessor(Unknown Source)
at java.lang.reflect.Field.acquireFieldAccessor(Unknown Source)
at java.lang.reflect.Field.getFieldAccessor(Unknown Source)
at java.lang.reflect.Field.get(Unknown Source)
at org.apache.catalina.loader.WebappClassLoader.clearReferencesStaticFinal(WebappClassLoader.java:2066)
at org.apache.catalina.loader.WebappClassLoader.clearReferences(WebappClassLoader.java:1929)
at org.apache.catalina.loader.WebappClassLoader.stop(WebappClassLoader.java:1833)
at org.apache.catalina.loader.WebappLoader.stop(WebappLoader.java:740)
at org.apache.catalina.core.StandardContext.stop(StandardContext.java:4920)
at org.apache.catalina.core.StandardContext.start(StandardContext.java:4750)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardHost.start(StandardHost.java:840)
at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1057)
at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:463)
at org.apache.catalina.core.StandardService.start(StandardService.java:525)
at org.apache.catalina.core.StandardServer.start(StandardServer.java:754)
at org.apache.catalina.startup.Catalina.start(Catalina.java:595)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:289)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:414)
log4j:ERROR Either File or DatePattern options are not set for appender [logfile].

解决方案

报的是java.io.FileNotFoundException: consoleldap.log (拒绝访问。)文件找不到或者新建文件时权限不够(比如win7以后的版本在C盘下建文件的话要管理员权限)
贴下log4j的配置,可以方便别人分析。

时间: 2024-12-21 12:30:10

error-log4j:ERROR setFile(null,true) call failed.的相关文章

error-关于log4j:ERROR setFile(null,true) call failed.

问题描述 关于log4j:ERROR setFile(null,true) call failed. 在myeclipse中从外部导入了一个web项目: 已经将log4j.properties中的日志输出路径修改为绝对路径,并且在此绝对路径中找到该日志文件,但是在运行中,始终去找" homecallcenterlogscsrlogs"这个路径?这是哪里出了问题,求高手解答!! 错误信息如下: log4j:ERROR setFile(null,true) call failed. jav

java-安卓开发问题~retry error,curr request is null

问题描述 安卓开发问题~retry error,curr request is null 小白初学安卓服务器开了,客户端运行总是timedout如下图,logcat显示retryhandler.retryrequest(l:91) retry error,curr request is null.百度看有些说是xutils问题,已经换了好几个版本尝试都不行.求问怎么解决~ 解决方案 你有120.0.0.1这个主机么?一般好像是写127.0.0.1吧

jar-retry error, curr request is null

问题描述 retry error, curr request is null 我的android项目出错:retry error, curr request is null.看到有人说找到library/src/com/lidroid/xutils/cache/KeyExpiryMap.java 进行修改.我用eclipse打开了xutils的jar包,是乱码.用winrar打开也是乱码.请问要怎么打开才能不是乱码呢?? 解决方案 http://bbs.csdn.net/topics/39104

mac port 更新报错:Error installing new MacPorts base: command execution failed

核心提示: 回想你是不是更新过xcode,而且更新过后,还没有使用过.如果是,请同意一下命令行版的用户协议,终端里运行 sudo xcodebuild -license然后按提示输入 agree,完了重试port更新. 如果不是这样,那请转到google搜索,并啃英文资料吧. 其实只需要看到这里就够了,下面是发现这一点的过程,可以认为是废话,不推荐继续阅读:读了也不多,多花费一点时间而已. mac port 用了一段时间,需要更新,但是出错了,如下: sh-3.2# port selfupdat

人脸识别-linux下qt中opencv打开摄像头HIGHGUI ERROR:OpenCV Error:

问题描述 linux下qt中opencv打开摄像头HIGHGUI ERROR:OpenCV Error: 我在Ubuntu下用qt结合opencv做一个人眼状态识别的程序,qt做界面,程序在vs控制台环境下已经可以运行,但是qt下出错.错误信息 如下: HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /home/mkc/op

php提示Parse error: syntax error, unexpected T_ENDWHILE in

问题现象: 1.同样的代码,在某些机器上运行正常,但在特定机器上运行报错. 2.同一站点部分页面显示正常(例如<?php phpinfo();?>),但打开部分页面时,phpxx_errors.log或者页面显示错误提示"Parse error: syntax error, unexpected T_ENDWHILE in xx.php on line xx". 错误原因: 该错误有可能是因为编写PHP脚本时丢失一个花括号("}"),但更常见的原因是ph

ERROR internal error process exited while conne错误

使用virt-install安装vm的时候出现了一下错误,解决方法如下: $sudo ./create-vm-demo.sh Starting install- ERROR internal error process exited while connecting to monitor: char device redirected to /dev/pts/2 kvm: -drive file=/home/muge0913/workstation/kvm/test.img,if=none,id

sql-SQL Error(3) : Error writing file

问题描述 SQL Error(3) : Error writing file 今天打开HeidiSQL想要在昨天的视图里增加一个查询的字段,就发生了一下错误: 后来把视图删除了 重新建 还是报这个错 我要怎么办.. 解决方案 http://stackoverflow.com/questions/7415710/mysql-writing-file-error-errcode-28

Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version

Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class 今天在idea上,利用scala的随机函数,写了一个测试程序,往kafka的服务器不间断写数据,程序写完后,打架包的时候报错. 解决方法一: 把项目里src下方的"test"文件夹删除后再打包就不报错了,"test"文件夹