Skip to main content

Log4j:WARN Please initialize the log4j system properly.

Removing Log4j error
You will get the following error, if you haven't kept the log4j.properties etc. file in your classpath

log4j:WARN No appenders could be found for logger (org.hibernate.cfg.Environment).
log4j:WARN Please initialize the log4j system properly.

To avoid this error, please make sure that first you keep commons-logging.jar,log4j.jar in your classpath and most importantly keep log4j.properties in the classpath and keep the contenets of that as below.


# Default Logging Configuration
log4j.rootLogger= DEBUG, stdout
#to increase logging level
#log4j.logger.org.dcm4cheri=DEBUG
#to decrease logging level
#log4j.logger.org.dcm4cheri=ERROR
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
#log4j.appender.stdout.layout.ConversionPattern=%d{ ABSOLUTE} %-5p %x - %m\n

This should resolve the log4j error.

Comments

Popular posts from this blog

Running Multiple Operating Systems(Windows and Ubuntu Linux) on the same machine

VMWare Player is a freely downloadable VMWare. Download VMWare player software and install it on your windows OS download an image of the Ubuntu Linux Desktop version called Ubuntu from http://www.ubuntu.com/getubuntu/download that in iso image format. Then download VMWare configuration bundle that contains a list of files, extract those file to some folder like C:\OS\. Then edit the file" os.vmx file and give the path of the .iso image in that file in the line like below. ide1:0.fileName = C:\OS\ubuntu-8.10-desktop-i386.iso" Now open the file os.vmx file using the vmware player, that will open the Ubuntu OS. You will get a list of options in that select the option install Ubuntu without changing your current configuration of the system Now that will start the Ubuntu OS in a window inside your windows OS. Now you have a browser and all the applications inside the Ubuntu OS, you can start working on that. Double click on this window/expand it to show in full screen. To switch ...