Friday, November 11, 2011

log4j:ERROR Could not parse url [file:log4j.xml]

If you get below mentioned error

log4j:WARN Fatal parsing error 15 and column 17
log4j:WARN Open quote is expected for attribute "{1}" associated with an  element type  "value".
log4j:ERROR Could not parse url [file:log4j.xml].
org.xml.sax.SAXParseException: Open quote is expected for attribute "{1}" associated with an  element type  "value".
    at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:249)
    at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:284)
    at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:180)
    at org.apache.log4j.xml.DOMConfigurator$2.parse(DOMConfigurator.java:612)
    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:711)
    at org.apache.log4j.xml.DOMConfigurator.doConfigure(DOMConfigurator.java:618)
    at org.apache.log4j.helpers.OptionConverter.selectAndConfigure(OptionConverter.java:470)
    at org.apache.log4j.LogManager.(LogManager.java:122)
    at org.slf4j.impl.Log4jLoggerFactory.getLogger(Log4jLoggerFactory.java:73)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:242)
    at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:254)
    at org.quartz.impl.StdSchedulerFactory.(StdSchedulerFactory.java:274)
    at com.hewitt.hre.scheduler.ScheduleJob.main(ScheduleJob.java:25)
log4j:WARN No appenders could be found for logger (org.quartz.impl.StdSchedulerFactory).
log4j:WARN Please initialize the log4j system properly.



Possible reason could be there is a syntax error in file log4j.xml. Please check the xml syntax of the file log4j.xml. All quotes and XML tags OR values should be properly mapped.

No comments:

Post a Comment