Log4j doesn't seem to find your configuration file. Have you tried running your application with a parameter like:
-Dlog4j.configuration=file:config/log4j.properties
So that Log4j finds your configuration file ("config/log4j.properties"
using System Property log4j.configuration
):
Alternatively, you can also put this configuration file in your classpath so that Log4j finds it, like in your source directory for example:
Else, here is what Log4j documentation explains or this error message:
This occurs when the default configuration files log4j.properties and log4j.xml can not be found and the application performs no explicit configuration. log4j uses Thread.getContextClassLoader().getResource() to locate the default configuration files and does not directly check the file system. Knowing the appropriate location to place log4j.properties or log4j.xml requires understanding the search strategy of the class loader in use. log4j does not provide a default configuration since output to the console or to the file system may be prohibited in some environments. Also see FAQ: Why can't log4j find my properties in a J2EE or WAR application?