I have a class called MyApp in LoggerPkg package. It has this line: private final static MyLogger logger =(MyLogger) MyLogger.getLogger(MyApp.class.getName()); MyLogger extends Logger.It has getLogger method that returns Logger object based on the LoggerFactory object. Now in the properties file if I have this line: "log4j.logger.LoggerPkg.MyApp=debug, A1" it shows the exception java.lang.ClassCastException on the line in MyApp. If I have only the rootLogger in the properties file, I dont get this Exception. Can anybody say y ASAP??