concordion / concordion-excel-extension

Allows Concordion specifications to be in Excel format rather than HTML
Other
9 stars 12 forks source link

fix #19 - diagnosis issues #20

Closed vgheo closed 5 years ago

vgheo commented 5 years ago

sample exception trace on invalid excel input:

org.concordion.ext.excel.ExcelCellConversionException: error processing at Sheet1!C1
    at org.concordion.ext.excel.conversion.cell.BasicCellConversionStrategy.process(BasicCellConversionStrategy.java:62)
    at org.concordion.ext.excel.conversion.cell.BasicCellConversionStrategy.process(BasicCellConversionStrategy.java:21)
    at org.concordion.ext.excel.conversion.row.ParagraphRowStrategy.processCell(ParagraphRowStrategy.java:55)
    at org.concordion.ext.excel.conversion.row.ParagraphsAndTablesRowStrategy.processCell(ParagraphsAndTablesRowStrategy.java:42)
    at org.concordion.ext.excel.conversion.row.ParagraphRowStrategy.process(ParagraphRowStrategy.java:39)
    at org.concordion.ext.excel.conversion.row.ParagraphRowStrategy.process(ParagraphRowStrategy.java:15)
    at org.concordion.ext.excel.conversion.sheet.BasicSheetConversionStrategy.process(BasicSheetConversionStrategy.java:34)
    at org.concordion.ext.excel.conversion.sheet.BasicSheetConversionStrategy.process(BasicSheetConversionStrategy.java:9)
    at org.concordion.ext.excel.conversion.workbook.BasicWorkbookConversionStrategy.process(BasicWorkbookConversionStrategy.java:40)
    at org.concordion.ext.excel.conversion.workbook.BasicWorkbookConversionStrategy.process(BasicWorkbookConversionStrategy.java:11)
    at org.concordion.ext.excel.ExcelSpecificationConverter.convert(ExcelSpecificationConverter.java:32)
    at org.concordion.internal.XMLSpecificationReader.asHtmlStream(XMLSpecificationReader.java:64)
    at org.concordion.internal.XMLSpecificationReader.readSpecification(XMLSpecificationReader.java:28)
    at org.concordion.Concordion.loadSpecificationFromResource(Concordion.java:104)
    at org.concordion.Concordion.getSpecification(Concordion.java:71)
    at org.concordion.Concordion.hasExampleCommands(Concordion.java:86)
    at org.concordion.Concordion.checkValidStatus(Concordion.java:120)
    at org.concordion.integration.junit4.ConcordionRunner.<init>(ConcordionRunner.java:69)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:78)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:38)
    at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:66)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:51)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:32)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:93)
    at com.sun.proxy.$Proxy2.processTestClass(Unknown Source)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.processTestClass(TestWorker.java:117)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:498)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:35)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:155)
    at org.gradle.internal.remote.internal.hub.MessageHubBackedObjectConnection$DispatchWrapper.dispatch(MessageHubBackedObjectConnection.java:137)
    at org.gradle.internal.remote.internal.hub.MessageHub$Handler.run(MessageHub.java:404)
    at org.gradle.internal.concurrent.ExecutorPolicy$CatchAndRecordFailures.onExecute(ExecutorPolicy.java:63)
    at org.gradle.internal.concurrent.ManagedExecutorImpl$1.run(ManagedExecutorImpl.java:46)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at org.gradle.internal.concurrent.ThreadFactoryImpl$ManagedThreadRunnable.run(ThreadFactoryImpl.java:55)
    at java.lang.Thread.run(Thread.java:748)
Caused by: org.concordion.ext.excel.conversion.cellcontent.ExcelAttributeConversionException: Couldn't find matching tag: table
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.findMatchingParentTag(DefaultCommentConverter.java:171)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.findMatchingParentTag(DefaultCommentConverter.java:166)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.findMatchingParentTag(DefaultCommentConverter.java:166)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.findMatchingParentTag(DefaultCommentConverter.java:166)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.findMatchingParentTag(DefaultCommentConverter.java:166)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.setHtmlAttribute(DefaultCommentConverter.java:151)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.access$000(DefaultCommentConverter.java:25)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter$1.addAttribute(DefaultCommentConverter.java:46)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.parseCommentString(DefaultCommentConverter.java:125)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.process(DefaultCommentConverter.java:43)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.process(DefaultCommentConverter.java:25)
    at org.concordion.ext.excel.conversion.cell.BasicCellConversionStrategy.process(BasicCellConversionStrategy.java:46)
    ... 57 more
Caused by: org.concordion.ext.excel.ExcelConversionException: Trying to add content above the HTML root element
    at org.concordion.ext.excel.conversion.HTMLBuilderImpl.withParentTag(HTMLBuilderImpl.java:131)
    at org.concordion.ext.excel.conversion.cellcontent.DefaultCommentConverter.findMatchingParentTag(DefaultCommentConverter.java:166)
    ... 68 more
robmoffat commented 5 years ago

I've pushed 2.1.4 to bintray - should be on maven central within the day

robmoffat commented 5 years ago

thanks very much for your help!