org.xml.sax.SAXException: Stopping after fatal error: An invalid XML character (Unicode: 0x6) was found in the element content of the document.

xerces-j-users | Jon Shoberg | 2 decades ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Re: Encoding Problems - DMOZ - RDF - Xerces-j

    xerces-j-users | 2 decades ago | Jon Shoberg
    org.xml.sax.SAXException: Stopping after fatal error: An invalid XML character (Unicode: 0x6) was found in the element content of the document.
  2. 0

    An exception occur saying the external entity file could not be found even actually the file put in the correct path. I try to parse the logback.xml with w3c dom. the xml could be parsed. that means the path of the external entity file is correct. Exception message: Failed to auto configure default logger context Reported exception: ch.qos.logback.core.joran.spi.JoranException: Problem parsing XML document. See previously reported errors. at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:67) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77) at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152) at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at org.slf4j.LoggerFactory.bind(LoggerFactory.java:141) at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:120) at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:331) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283) at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304) at com.kingland.independence.Test.main(Test.java:9) Caused by: org.xml.sax.SAXException: Stopping after fatal error: File "common.ent" not found. at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1245) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:780) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromParameterEntity(DefaultEntityHandler.java:703) at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:588) at org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java:1498) at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1123) at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145) at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100) at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831) at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098) at javax.xml.parsers.SAXParser.parse(SAXParser.java:392) at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:61) ... 13 more 17:36:36,538 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Could NOT find resource [logback.groovy] 17:36:36,538 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [logback-test.xml] at [file:/C:/Development/Hub/Master/Independence/Independence/webApplication/WEB-INF/classes/logback-test.xml] 17:36:36,881 |-ERROR in ch.qos.logback.core.joran.event.SaxEventRecorder@2c54366 - XML_PARSING - Parsing fatal error on line 0 and column 0 org.xml.sax.SAXParseException; systemId: ; lineNumber: 0; columnNumber: 0; File "common.ent" not found. at org.xml.sax.SAXParseException: File "common.ent" not found. at at org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1219) at at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromExternalEntity(DefaultEntityHandler.java:780) at at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromParameterEntity(DefaultEntityHandler.java:703) at at org.apache.xerces.readers.DefaultEntityHandler.startReadingFromEntity(DefaultEntityHandler.java:588) at at org.apache.xerces.framework.XMLDTDScanner.scanDecls(XMLDTDScanner.java:1498) at at org.apache.xerces.framework.XMLDTDScanner.scanDoctypeDecl(XMLDTDScanner.java:1123) at at org.apache.xerces.framework.XMLDocumentScanner.scanDoctypeDecl(XMLDocumentScanner.java:2145) at at org.apache.xerces.framework.XMLDocumentScanner.access$0(XMLDocumentScanner.java:2100) at at org.apache.xerces.framework.XMLDocumentScanner$PrologDispatcher.dispatch(XMLDocumentScanner.java:831) at at org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381) at at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098) at at javax.xml.parsers.SAXParser.parse(SAXParser.java:392) at at ch.qos.logback.core.joran.event.SaxEventRecorder.recordEvents(SaxEventRecorder.java:61) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:134) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:99) at at ch.qos.logback.core.joran.GenericConfigurator.doConfigure(GenericConfigurator.java:49) at at ch.qos.logback.classic.util.ContextInitializer.configureByResource(ContextInitializer.java:77) at at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:152) at at org.slf4j.impl.StaticLoggerBinder.init(StaticLoggerBinder.java:85) at at org.slf4j.impl.StaticLoggerBinder.<clinit>(StaticLoggerBinder.java:55) at at org.slf4j.LoggerFactory.bind(LoggerFactory.java:141) at at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:120) at at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:331) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:283) at at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:304) at at com.kingland.independence.Test.main(Test.java:9) ----------------------------------------------------------------------------------------- My test code: package com.kingland.independence; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class Test { public static void main(String[] args) throws Exception { DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); Document doc = builder.parse("C:\\Development\\Hub\\Master\\Independence\\Independence\\webApplication\\WEB-INF\\classes\\logback.xml"); NodeList nodes = doc.getElementsByTagName("pattern"); for (int i = 0; i < nodes.getLength(); i++){ Node node = nodes.item(i); System.out.println(node.getFirstChild().getNodeValue()); } } } ----------------------------------------------------------------------------------------- My logback.xml file: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE configuration[ <!ENTITY % common SYSTEM "common.ent"> %common; ]> <!-- used for BVT/UAT/PROD environment, will not include debug information and print in console --> <configuration scan="true"> <conversionRule conversionWord="crlf" converterClass="org.owasp.security.logging.mask.CRLFConverter" /> <include resource="logback-common.xml" /> <appender name="Console" class="ch.qos.logback.core.ConsoleAppender"> <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> <level>ERROR</level> </filter> <layout class="ch.qos.logback.classic.PatternLayout"> <pattern>%d{&LOGGING_DATE_PATTERN; &LOGGING_TIME_PATTERN;}{&LOGGING_TIME_ZONE;} [%thread] [%marker] %-5level %logger{36} throwable{full} - %crlf(%msg) %n</pattern> </layout> </appender> <root level="INFO"> <appender-ref ref="Console" /> <appender-ref ref="IndyLogFile" /> </root> </configuration>

    QOS.ch JIRA | 2 years ago | daniel.ruiqing.wang
    ch.qos.logback.core.joran.spi.JoranException: Problem parsing XML document. See previously reported errors.
  3. 0

    JarVerifier Failing

    Oracle Community | 1 decade ago | 843802
    org.xml.sax.SAXException: Stopping after fatal error: File "file:///D:/Documents and Settings/edlang/Desktop/java.util.jar.JarVerifier$VerifierStream@11eb199" not found.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    dummy://log4j.dtd (log4j problem in Oracle 10gAS)

    Oracle Community | 1 decade ago | 346268
    org.xml.sax.SAXException: Stopping after fatal error: File "dummy://log4j.dtd" not found.
  6. 0

    strut menu deployment problems

    struts-menu | 1 decade ago | meher_charan
    org.xml.sax.SAXException: Stopping after fatal error: File "" not found.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.xml.sax.SAXException

      Stopping after fatal error: An invalid XML character (Unicode: 0x6) was found in the element content of the document.

      at org.apache.xerces.framework.XMLParser.reportError()
    2. org.apache.xerces
      XMLParser.parse
      1. org.apache.xerces.framework.XMLParser.reportError(XMLParser.java:1245)
      2. org.apache.xerces.framework.XMLDocumentScanner.reportFatalXMLError(XMLDocumentScanner.java:588)
      3. org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XMLDocumentScanner.java:1304)
      4. org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.java:381)
      5. org.apache.xerces.framework.XMLParser.parse(XMLParser.java:1098)
      5 frames
    3. Unknown
      dmoz.main
      1. dmoz.main(dmoz.java:110)
      1 frame