I have added log4j.properties file in source folder of project but I am still getting a log4j:error.
log4j.properties
Here is my Log4j.properties file:
I had the exact same problem. Here is the solution that worked for me: simply put your properties file path in the cmd line this way :
-Dlog4j.configuration= (ex: log4j.properties)
Hope this will help you