Solved

log4j:WARN

Posted on 2010-09-09
6
899 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 20

Expert Comment

by:ChristoferDutz
ID: 33636623
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
ID: 33636649
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
ID: 33636760
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
Revamp Your Training Process

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action.

 
LVL 16

Assisted Solution

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

Author Comment

by:anushahanna
ID: 33637979
Thanks very much.
0
 
LVL 92

Expert Comment

by:objects
ID: 33642424
0

Featured Post

Transaction Monitoring Vs. Real User Monitoring

Synthetic Transaction Monitoring Vs. Real User Monitoring: When To Use Each Approach? In this article, we will discuss two major monitoring approaches: Synthetic Transaction and Real User Monitoring.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A quick step-by-step overview of installing and configuring Carbonite Server Backup.
Learn about cloud computing and its benefits for small business owners.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

734 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