I guess Log4j is using a different configuration file found on the classpath. Try running your application with -Dlog4j.debug
If your application runs in Tomcat you could add it to:
export TOMCAT_OPTS="-Dlog4j.debug -Dlog4j.configuration=foobar.xml"
Running it with debug
will show you where log4j finds it configuration.