com.ctc.wstx.exc.WstxIOException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764)

Atlassian JIRA | Max Bowsher | 5 years ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    I attempted export / re-import to switch DB type from HSQL to MySQL. Import failed. Logs reveal the cause is invalid characters improperly escaped in the export XML: {noformat} 2012-05-10 15:31:57,613 WARN [qtp582642819-12] [BambooStAXMappingHelperAbstractImpl] Exception during processing testCaseResultErrors.error #1069 com.ctc.wstx.exc.WstxIOException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764) at com.ctc.wstx.sr.StreamScanner.constructFromIOE(StreamScanner.java:625) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:994) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1033) at com.ctc.wstx.sr.BasicStreamReader.readCDataSecondary(BasicStreamReader.java:4310) at com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4120) at com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:675) at org.codehaus.staxmate.in.SMInputCursor.getElemStringValue(SMInputCursor.java:1331) at com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importProperties(TestCaseResultErrorMapper.java:86) at com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importProperties(TestCaseResultErrorMapper.java:21) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.importXml(BambooStAXMappingHelperAbstractImpl.java:167) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy.importListItemXml(BambooStAXListImportStrategy.java:268) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy.access$100(BambooStAXListImportStrategy.java:17) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy$3.importListItems(BambooStAXListImportStrategy.java:103) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy.importListXml(BambooStAXListImportStrategy.java:235) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.importListXml(BambooStAXMappingListHelperAbstractImpl.java:179) at com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importData(TestCaseResultErrorMapper.java:143) at com.atlassian.bamboo.migration.XmlMigrator.importData(XmlMigrator.java:360) at com.atlassian.bamboo.migration.XmlMigrator.importFile(XmlMigrator.java:329) at com.atlassian.bamboo.migration.XmlMigrator.loadXmlData(XmlMigrator.java:285) at com.atlassian.bamboo.migration.XmlMigrator.importXml(XmlMigrator.java:180) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629) at com.atlassian.bamboo.migration.XmlMigrator$$EnhancerByCGLIB$$204e6f8b.importXml(<generated>) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:113) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:91) at com.atlassian.bamboo.ww2.actions.setup.SetupImportDataAction.execute(SetupImportDataAction.java:53) ........ Caused by: java.io.CharConversionException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764) at com.ctc.wstx.io.BaseReader.reportInvalidXml11(BaseReader.java:222) at com.ctc.wstx.io.BambooUTF8Reader.read(BambooUTF8Reader.java:140) at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:87) at com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:988) {noformat} The problem XML in question is where binary data was printed in JUnit test output, and that's in a /bamboo/testCaseResultErrors/error/content XML element. h5. Workaround # Use {{tail -c +#### fileName|head -c 1024}} to get the section of the file where the offending character is located at. ### being the byte number as reported in the error. Experiment with reducing a few bytes before the offending character to get the ID of the error. # After getting the ID, manually edit the contents of the error through the database to remove the offending characters: {code:SQL}UPDATE test_error SET error_content='Removed' WHERE error_id=<ID>; {code} Replace <ID> with the error ID you found from the text. # Take the export again and import it into the new instance.

    Atlassian JIRA | 5 years ago | Max Bowsher
    com.ctc.wstx.exc.WstxIOException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764)
  2. 0

    I attempted export / re-import to switch DB type from HSQL to MySQL. Import failed. Logs reveal the cause is invalid characters improperly escaped in the export XML: {noformat} 2012-05-10 15:31:57,613 WARN [qtp582642819-12] [BambooStAXMappingHelperAbstractImpl] Exception during processing testCaseResultErrors.error #1069 com.ctc.wstx.exc.WstxIOException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764) at com.ctc.wstx.sr.StreamScanner.constructFromIOE(StreamScanner.java:625) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:994) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1033) at com.ctc.wstx.sr.BasicStreamReader.readCDataSecondary(BasicStreamReader.java:4310) at com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4120) at com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:675) at org.codehaus.staxmate.in.SMInputCursor.getElemStringValue(SMInputCursor.java:1331) at com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importProperties(TestCaseResultErrorMapper.java:86) at com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importProperties(TestCaseResultErrorMapper.java:21) at com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.importXml(BambooStAXMappingHelperAbstractImpl.java:167) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy.importListItemXml(BambooStAXListImportStrategy.java:268) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy.access$100(BambooStAXListImportStrategy.java:17) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy$3.importListItems(BambooStAXListImportStrategy.java:103) at com.atlassian.bamboo.migration.BambooStAXListImportStrategy.importListXml(BambooStAXListImportStrategy.java:235) at com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.importListXml(BambooStAXMappingListHelperAbstractImpl.java:179) at com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importData(TestCaseResultErrorMapper.java:143) at com.atlassian.bamboo.migration.XmlMigrator.importData(XmlMigrator.java:360) at com.atlassian.bamboo.migration.XmlMigrator.importFile(XmlMigrator.java:329) at com.atlassian.bamboo.migration.XmlMigrator.loadXmlData(XmlMigrator.java:285) at com.atlassian.bamboo.migration.XmlMigrator.importXml(XmlMigrator.java:180) at com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629) at com.atlassian.bamboo.migration.XmlMigrator$$EnhancerByCGLIB$$204e6f8b.importXml(<generated>) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:113) at com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:91) at com.atlassian.bamboo.ww2.actions.setup.SetupImportDataAction.execute(SetupImportDataAction.java:53) ........ Caused by: java.io.CharConversionException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764) at com.ctc.wstx.io.BaseReader.reportInvalidXml11(BaseReader.java:222) at com.ctc.wstx.io.BambooUTF8Reader.read(BambooUTF8Reader.java:140) at com.ctc.wstx.io.ReaderSource.readInto(ReaderSource.java:87) at com.ctc.wstx.io.BranchingReaderSource.readInto(BranchingReaderSource.java:57) at com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:988) {noformat} The problem XML in question is where binary data was printed in JUnit test output, and that's in a /bamboo/testCaseResultErrors/error/content XML element. h5. Workaround # Use {{tail -c +#### fileName|head -c 1024}} to get the section of the file where the offending character is located at. ### being the byte number as reported in the error. Experiment with reducing a few bytes before the offending character to get the ID of the error. # After getting the ID, manually edit the contents of the error through the database to remove the offending characters: {code:SQL}UPDATE test_error SET error_content='Removed' WHERE error_id=<ID>; {code} Replace <ID> with the error ID you found from the text. # Take the export again and import it into the new instance.

    Atlassian JIRA | 5 years ago | Max Bowsher
    com.ctc.wstx.exc.WstxIOException: Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764)

    Root Cause Analysis

    1. com.ctc.wstx.exc.WstxIOException

      Invalid character 0x7f, can only be included in xml 1.1 using character entities (at char #3078549, byte #3078764)

      at com.ctc.wstx.sr.StreamScanner.constructFromIOE()
    2. Woodstox
      BasicStreamReader.getElementText
      1. com.ctc.wstx.sr.StreamScanner.constructFromIOE(StreamScanner.java:625)
      2. com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:994)
      3. com.ctc.wstx.sr.StreamScanner.loadMore(StreamScanner.java:1033)
      4. com.ctc.wstx.sr.BasicStreamReader.readCDataSecondary(BasicStreamReader.java:4310)
      5. com.ctc.wstx.sr.BasicStreamReader.readCoalescedText(BasicStreamReader.java:4120)
      6. com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:675)
      6 frames
    3. StaxMate
      SMInputCursor.getElemStringValue
      1. org.codehaus.staxmate.in.SMInputCursor.getElemStringValue(SMInputCursor.java:1331)
      1 frame
    4. com.atlassian.bamboo
      XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke
      1. com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importProperties(TestCaseResultErrorMapper.java:86)
      2. com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importProperties(TestCaseResultErrorMapper.java:21)
      3. com.atlassian.bamboo.migration.BambooStAXMappingHelperAbstractImpl.importXml(BambooStAXMappingHelperAbstractImpl.java:167)
      4. com.atlassian.bamboo.migration.BambooStAXListImportStrategy.importListItemXml(BambooStAXListImportStrategy.java:268)
      5. com.atlassian.bamboo.migration.BambooStAXListImportStrategy.access$100(BambooStAXListImportStrategy.java:17)
      6. com.atlassian.bamboo.migration.BambooStAXListImportStrategy$3.importListItems(BambooStAXListImportStrategy.java:103)
      7. com.atlassian.bamboo.migration.BambooStAXListImportStrategy.importListXml(BambooStAXListImportStrategy.java:235)
      8. com.atlassian.bamboo.migration.BambooStAXMappingListHelperAbstractImpl.importListXml(BambooStAXMappingListHelperAbstractImpl.java:179)
      9. com.atlassian.bamboo.resultsummary.tests.TestCaseResultErrorMapper.importData(TestCaseResultErrorMapper.java:143)
      10. com.atlassian.bamboo.migration.XmlMigrator.importData(XmlMigrator.java:360)
      11. com.atlassian.bamboo.migration.XmlMigrator.importFile(XmlMigrator.java:329)
      12. com.atlassian.bamboo.migration.XmlMigrator.loadXmlData(XmlMigrator.java:285)
      13. com.atlassian.bamboo.migration.XmlMigrator.importXml(XmlMigrator.java:180)
      14. com.atlassian.bamboo.migration.XmlMigrator$$FastClassByCGLIB$$b6578fc7.invoke(<generated>)
      14 frames
    5. IDEA
      MethodProxy.invoke
      1. net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      1 frame
    6. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:694)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      2 frames
    7. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    8. Spring AOP
      Cglib2AopProxy$DynamicAdvisedInterceptor.intercept
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:629)
      2 frames
    9. com.atlassian.bamboo
      SetupImportDataAction.execute
      1. com.atlassian.bamboo.migration.XmlMigrator$$EnhancerByCGLIB$$204e6f8b.importXml(<generated>)
      2. com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:113)
      3. com.atlassian.bamboo.migration.ImportExportManagerImpl.bambooImport(ImportExportManagerImpl.java:91)
      4. com.atlassian.bamboo.ww2.actions.setup.SetupImportDataAction.execute(SetupImportDataAction.java:53)
      4 frames