jQuery in Action, 3rd edition
The moose likes Tomcat and the fly likes log4j:ERROR setFile(null,true) call failed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "log4j:ERROR setFile(null,true) call failed" Watch "log4j:ERROR setFile(null,true) call failed" New topic

log4j:ERROR setFile(null,true) call failed

Smriti Anchu
Ranch Hand

Joined: Dec 21, 2004
Posts: 40

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.
java.io.FileNotFoundException: "Mail.log" (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileOutputStream.openAppend(Native Method)
at java.io.FileOutputStream.<init>(Unknown Source)
at java.io.FileOutputStream.<init>(Unknown Source)
at org.apache.log4j.FileAppender.setFile(FileAppender.java:289)
at org.apache.log4j.RollingFileAppender.setFile(RollingFileAppender.java:165)
at org.apache.log4j.FileAppender.activateOptions(FileAppender.java:163)
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.configure(PropertyConfigurator.java:349)
at com.test.util.LogHooks.initLogger(LogHooks.java:141)
at com.test.util.LogHooks.writeOutputLog(LogHooks.java:155)
at com.test.action.MailAction.executeProcess(MailAction.java:103)
at com.tk.startup.EmailStartUp.main(EmailStartUp.java:45)

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

thanks in advance
I agree. Here's the link: http://aspose.com/file-tools
subject: log4j:ERROR setFile(null,true) call failed
jQuery in Action, 3rd edition