Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 913
  • 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
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

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

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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