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.

Atlassian JIRA | Sam Berlin | 9 years ago
  1. 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.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.
  2. 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.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.
  3. 0

    As above, sometimes the buildresultxml files are null so we need to put in a check to see whether this the case, if so delete the corresponding build result or at the very least not try to parse the null file. {code} org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file. 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:48) 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:585) 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 $Proxy34.doUpgrade(Unknown Source) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:128) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:89) 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: Premature end of file. 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) {code}

    Atlassian JIRA | 9 years ago | Ajay Sridhar [Atlassian]
    org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    As above, sometimes the buildresultxml files are null so we need to put in a check to see whether this the case, if so delete the corresponding build result or at the very least not try to parse the null file. {code} org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file. 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:48) 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:585) 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 $Proxy34.doUpgrade(Unknown Source) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:128) at com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:89) 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: Premature end of file. 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) {code}

    Atlassian JIRA | 9 years ago | Ajay Sridhar [Atlassian]
    org.dom4j.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
  6. 0

    Trying to validate XML Schema with DOM4J, Xerces

    Google Groups | 1 decade ago | David Wake
    org.dom4j.DocumentException: Error on line 1 of document : General Schema Error: Gr\ ammar with uri 2: http://www.w3.org/2001/XMLSchema , can not found. Nested exception\ : General Schema Error: Grammar with uri 2: http://www.w3.org/2001/XMLSchema , can n\ ot found.

    41 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.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()
    2. dom4j
      SAXReader.read
      1. org.dom4j.io.SAXReader.read(SAXReader.java:355)
      2. org.dom4j.io.SAXReader.read(SAXReader.java:219)
      2 frames
    3. com.atlassian.bamboo
      UpgradeTask608BuildLogStorageUpdate.doUpgrade
      1. com.atlassian.bamboo.upgrade.tasks.UpgradeTask608BuildLogStorageUpdate.doUpgrade(UpgradeTask608BuildLogStorageUpdate.java:70)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Hibernate
      HibernateInterceptor.invoke
      1. org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy33.doUpgrade
      1. $Proxy33.doUpgrade(Unknown Source)
      1 frame
    9. com.atlassian.bamboo
      UpgradeLauncher.contextInitialized
      1. com.atlassian.bamboo.upgrade.UpgradeManagerImpl.runUpgradeTask(UpgradeManagerImpl.java:122)
      2. com.atlassian.bamboo.upgrade.UpgradeManagerImpl.doUpgrade(UpgradeManagerImpl.java:88)
      3. com.atlassian.bamboo.upgrade.UpgradeLauncher.upgradeAndStartBamboo(UpgradeLauncher.java:104)
      4. com.atlassian.bamboo.upgrade.UpgradeLauncher.contextInitialized(UpgradeLauncher.java:37)
      4 frames
    10. Jetty Server
      WebAppContext.doStart
      1. org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:530)
      2. org.mortbay.jetty.servlet.Context.startContext(Context.java:135)
      3. org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
      4. org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
      5. org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
      5 frames
    11. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      1 frame
    12. Jetty Server
      Server.doStart
      1. org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
      2. org.mortbay.jetty.Server.doStart(Server.java:217)
      2 frames
    13. Jetty Util
      AbstractLifeCycle.start
      1. org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
      1 frame
    14. com.atlassian.bamboo
      Server.main
      1. com.atlassian.bamboo.server.Server.main(Server.java:60)
      1 frame