• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 919
  • Last Modified:

log4j:WARN

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
anushahanna
Asked:
anushahanna
2 Solutions
 
ChristoferDutzCommented:
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
 
ChristoferDutzCommented:
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
 
ValeriCommented:
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
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
ValeriCommented:
ops, sorry! replace this line
log4j.rootLogger=DEBUG, A
with this one :
log4j.rootLogger=ERROR, A
0
 
anushahannaAuthor Commented:
Thanks very much.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now