-
Type:
Bug
-
Resolution: Timed out
-
Priority:
Low
-
None
-
Affects Version/s: 4.0.1
-
Component/s: Import / Export
-
Environment:
Bamboo 4.0.1; Original data from Bamboo 1.x, upgraded through 1.2.4, 2.0.6, 2.6.3, 2.7.4, 4.0.1
-
8
-
Severity 2 - Major
-
2
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:
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)
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.
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:
UPDATE test_error SET error_content='Removed' WHERE error_id=<ID>;
Replace <ID> with the error ID you found from the text.
- Take the export again and import it into the new instance.
- is duplicated by
-
BAM-11974 Bamboo generates backups that cannot be imported later
-
- Closed
-
- is related to
-
BAM-11037 Validate build definition XML files before saving them into the database
- Closed
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...