PropertyConfigurator.configure(ABC.class.getResourceAsStream("log4j.properties"))
worked me correctly, but basically you need to place Log4j properties file in Source Code folder (next to Java Class).
OR you can try putting outside and give proper path in getResourceAsStream("resources/log4j.properties")
method