org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the element content of the document.

Oracle Community | 592741 | 9 years ago
  1. 0

    FOP and Cocoon in linux

    Oracle Community | 9 years ago | 592741
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x0) was found in the element content of the document.
  2. 0

    How to Print in PDF using XSL-FO with FOP  ????

    Oracle Community | 7 years ago | Pierre C.
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
  3. 0

    Trouble Producing Custom Reports Using Tomcat, Cocoon and FODesigner

    Oracle Community | 7 years ago | 721930
    org.xml.sax.SAXParseException: XML document structures must start and end within the same entity.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Upgrading from 1.2.4 to 2.0b4, upgrade task 608 is failing on malformed XML. The relevant lines from the log are: 2008-03-10 17:03:06,439 INFO [main] [UpgradeTask608BuildLogStorageUpdate] Processing file buildresults3416.xml 2008-03-10 17:03:06,439 INFO [main] [UpgradeTask608BuildLogStorageUpdate] 137 / 234 (97) 2008-03-10 17:03:06,837 ERROR [main] [UpgradeTask608BuildLogStorageUpdate] Upgrade Task failed to upgrade logs for DEF 2008-03-10 17:03:06,843 ERROR [main] [UpgradeManagerImpl] org.dom4j.DocumentException: Error on line 128407 of document : An invalid XML character (Unicode: 0x8) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x8) was found in the element content of the document. org.dom4j.DocumentException: Error on line 128407 of document : An invalid XML character (Unicode: 0x8) was found in the element content of the document. Nested exception: An invalid XML character (Unicode: 0x8) was found in the element content of the document. at org.dom4j.io.SAXReader.read(SAXReader.java:355) at org.dom4j.io.SAXReader.read(SAXReader.java:219) at com.atlassian.bamboo.upgrade.tasks.UpgradeTask608BuildLogStorageUpdate.doUpgrade(UpgradeTask608BuildLogStorageUpdate.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy33.doUpgrade(Unknown Source) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:122) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:88) at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:104) at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:37) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.atlassian.bamboo.server.Server.main(Server.java:60) Nested exception: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the element content of the document. at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source) at org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source) at org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source) at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source) at org.apache.xerces.parsers.XMLParser.parse(Unknown Source) at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source) at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at org.dom4j.io.SAXReader.read(SAXReader.java:339) at org.dom4j.io.SAXReader.read(SAXReader.java:219) at com.atlassian.bamboo.upgrade.tasks.UpgradeTask608BuildLogStorageUpdate.doUpgrade(UpgradeTask608BuildLogStorageUpdate.java:70) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy33.doUpgrade(Unknown Source) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:122) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:88) at com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:104) at com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:37) at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530) at org.mortbay.jetty.servlet.Context.startContext(Context.java:135) at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218) at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500) at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117) at org.mortbay.jetty.Server.doStart(Server.java:217) at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40) at com.atlassian.bamboo.server.Server.main(Server.java:60) 2008-03-10 17:03:06,848 INFO [main] [UpgradeManagerImpl] Completed upgrade task 608 with errors. The relevant part of the XML is: <BuildOutputLogEntry> <time>1199377738674</time> <log>2008-01-03 11:28:58,674 [main] INFO com.limewire.store.core.search.dao.SearchIndexerSolrImpl - ProductDoc: Document&lt;stored/uncompressed&lt;albumId:118&gt; stored/uncompressed,indexed,tokenized&lt;objectType:album&gt; stored/uncompressed,indexed,omitNorms&lt;key:album:118&gt; stored/uncompressed,indexed,omitNorms&lt;popularity:^H^@^@^@^K&gt; stored/uncompressed,indexed,omitNorms&lt;rating:Ãà¨^@&gt; indexed,tkenized&lt;provider:this-is-a-provider-product-id-1&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:this-is-a-provider-product-id-1&gt; stored/uncompressed&lt;artistId:260&gt; stored/uncompressed,indexed,omitNorms&lt;isArtistClickable:T&gt; stored/uncompressed&lt;file:&gt; indexed,tokenized&lt;territory:DE&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:DE&gt; stored/uncompressed,indexed,tokenized&lt;sartist_ger:260|true|null|null&gt; indexed,tokenized&lt;ger_combined_text:260|true|null|null&gt; stored/uncompressed,indexed,tokenized&lt;origRelDate_ger:2008-01-03T11:28:58.587Z&gt; indexed,tokenized&lt;ger_combined_text:2008-01-03T11:28:58.587Z&gt; stored/uncompressed,indexed,tokenized&lt;explicitLyrics_ger:false&gt; indexed,tokenized&lt;ger_combined_text:false&gt; indexed,tokenized&lt;territory:US&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:US&gt; indexed,tokenized&lt;label:Strata East Records&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:Strata East Records&gt; stored/uncompressed,indexed,tokenized&lt;albumTitle:Some Title&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:Some Title&gt; stored/uncompressed,indexed,omitNorms&lt;salbumTitle:Some Title&gt; stored/uncompressed,indexed,tokenized&lt;artist:The Artist Formerly Known As Leo&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:The Artist Formerly Known As Leo&gt; stored/uncompressed,indexed,omitNorms&lt;sartist:260|true|null|The Artist Formerly Known As Leo&gt; indexed,omitNorms&lt;origRelDate:2008-01-03T11:28:58.568&gt; stored/uncompressed,indexed,omitNorms&lt;explicitLyrics:T&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:I Have Great Talent&gt; stored/uncompressed,indexed,tokenized&lt;albumTrackTitles:I Have Great Talent&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:Yanni Jr.&gt; indexed,tokenized&lt;territory:ES&gt; stored/uncompressed,indexed,tokenized&lt;combined_text:ES&gt; stored/uncompressed,indexed,tokenized&lt;sartist_spa:260|true|null|null&gt; indexed,tokenized&lt;spa_combined_text:260|true|null|null&gt; stored/uncompressed,indexed,tokenized&lt;origRelDate_spa:2008-01-03T11:28:58.670Z&gt; indexed,tokenized&lt;spa_combined_text:2008-01-03T11:28:58.670Z&gt; stored/uncompressed,indexed,tokenized&lt;explicitLyrics_spa:false&gt; indexed,tokenized&lt;spa_combined_text:false&gt;&gt;</log> </BuildOutputLogEntry> It's failing on the '^H^@^@^@^K' part . (Those are really control characters, not the characters ^, H, @, or K.) I'm not sure why the malformed data would be written to the logs in the first place... but it's likely that there was a test that wrote malformed data to System.out as part of its testing. I manually edited out the malformed data from the first buildresults###.xml that failed, but the error happened again on another... so I'm hoping there's a way to fix this without having to manually edit every file.

    Atlassian JIRA | 9 years ago | Sam Berlin
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x8) was found in the element content of the document.
  6. 0

    Unexpected SAXParseException

    Icesoft | 9 years ago | kito99
    org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.

    8 unregistered visitors
    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.SAXParseException

      An invalid XML character (Unicode: 0x0) was found in the element content of the document.

      at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException()
    2. Xerces2-j
      SAXParserImpl$JAXPSAXParser.parse
      1. org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
      2. org.apache.xerces.util.ErrorHandlerWrapper.fatalError(Unknown Source)
      3. org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      4. org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
      5. org.apache.xerces.impl.XMLScanner.reportFatalError(Unknown Source)
      6. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
      7. org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
      8. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      9. org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
      10. org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
      11. org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
      12. org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
      12 frames
    3. org.apache.excalibur
      JaxpParser.parse
      1. org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
      2. org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:334)
      2 frames
    4. org.apache.cocoon
      CocoonServlet.service
      1. org.apache.cocoon.generation.StreamGenerator.generate(StreamGenerator.java:154)
      2. org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:579)
      3. org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:279)
      4. org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:780)
      5. org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:413)
      6. org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:101)
      7. org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:321)
      8. org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
      9. org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:572)
      10. org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:279)
      11. org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:481)
      12. org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:121)
      13. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      14. org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:104)
      15. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      16. org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      17. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      18. org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      19. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      20. org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      21. org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
      22. org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
      23. org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253)
      24. org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:118)
      25. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:47)
      26. org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:108)
      27. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      28. org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:143)
      29. org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:69)
      30. org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
      31. org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:235)
      32. org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:177)
      33. org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:253)
      34. org.apache.cocoon.Cocoon.process(Cocoon.java:699)
      35. org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1154)
      35 frames
    5. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      1 frame
    6. Glassfish Core
      CoyoteAdapter.service
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
      4. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      5. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      6. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      7. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      8. org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
      8 frames
    7. Grizzly HTTP
      JIoEndpoint$Worker.run
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      3. org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      3 frames
    8. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame