Solved

log4j:WARN

Posted on 2010-09-09
6
882 Views
Last Modified: 2013-11-09
where is the setting to initialize, for the below error: (after running a batch file where java.exe is called)
----------------------
log4j:WARN No appenders could be found for logger (org.springframework.context.s
upport.ClassPathXmlApplicationContext).
log4j:WARN Please initialize the log4j system properly.
0
Comment
Question by:anushahanna
6 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
Comment Utility
This error usually only occurs, when the Log4J System initializes itself and it cannot find a log4j.properties in any of the default locations.
0
 
LVL 20

Accepted Solution

by:
ChristoferDutz earned 250 total points
Comment Utility
Are you running a web application? If yes you could add the following to your web.xml and add a log4j.properties to the WEB-INF/classes directory. It makes sure the Log4J subsystem is correclty initialized. Also have a look at this overview-documentation (Includes an example log4j.properties file) http://logging.apache.org/log4j/1.2/manual.html
    <listener>

        <listener-class>

            org.springframework.web.util.Log4jConfigListener

        </listener-class>

    </listener>

Open in new window

0
 
LVL 16

Expert Comment

by:Valeri
Comment Utility
Find out where is placed your commons-logging*.jar
Put the attached file in the same directory, just rename it to log4j.properties before that.
log4j.txt
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 16

Assisted Solution

by:Valeri
Valeri earned 250 total points
Comment Utility
ops, sorry! replace this line
log4j.rootLogger=DEBUG, A
with this one :
log4j.rootLogger=ERROR, A
0
 
LVL 6

Author Comment

by:anushahanna
Comment Utility
Thanks very much.
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
This theoretical tutorial explains exceptions, reasons for exceptions, different categories of exception and exception hierarchy.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now