Win a copy of The Way of the Web Tester: A Beginner's Guide to Automating Tests this week in the Testing forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

log4j:ERROR setFile(null,true) call failed

Smriti Anchu
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

I am getting the following error
"log4j:ERROR setFile(null,true) call failed." When i try to run the application.

The below code is the sample class file which is used for put properties into the the Properties file.

In the action class, I am calling the above class to write the logger

When I try to run the application, it is giving me the following error when trying to write it to the log file

log4j:ERROR setFile(null,true) call failed. "Mail.log" (The filename, directory name, or volume label syntax is incorrect)
at Method)
at<init>(Unknown Source)
at<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(
at org.apache.log4j.RollingFileAppender.setFile(
at org.apache.log4j.FileAppender.activateOptions(
at org.apache.log4j.config.PropertySetter.activate(
at org.apache.log4j.config.PropertySetter.setProperties(
at org.apache.log4j.config.PropertySetter.setProperties(
at org.apache.log4j.PropertyConfigurator.parseAppender(
at org.apache.log4j.PropertyConfigurator.parseCategory(
at org.apache.log4j.PropertyConfigurator.configureRootCategory(
at org.apache.log4j.PropertyConfigurator.doConfigure(
at org.apache.log4j.PropertyConfigurator.configure(
at com.test.util.LogHooks.initLogger(
at com.test.util.LogHooks.writeOutputLog(
at com.test.action.MailAction.executeProcess(

Anybody could you please tell me as to how to avoid this error file when trying to run the applicaiton

thanks in advance
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic