I have added log4j.properties file in source folder of project but I am still getting a log4j:error.
Here is my Log4j.properties file:
this error is coming because of appender file location you have provided is not reachable with current user access.
Quick Solution, change the log4j.appender.FILE.File setting to point to file using absolute path which location is reachable to the current user you have logged in, for example /tmp/myapp.log. Now You should not get an error.