Description
Daffodil fails with an unexpected exception error when a <choice> element has an empty sequence as a target. Full schema attached. Relevent section is:
```
<xs:element name="x">
<xs:complexType>
<xs:choice>
<xs:sequence>
<xs:sequence/>
</xs:sequence>
<xs:choice>
</xs:complexType>
</xs:element>
```
Error is:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!! An unexpected exception occurred. This is a bug! !!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Please report this bug and help us fix it:
https://daffodil.apache.org/community/#issue-tracker
Please include the following exception, the command you
ran, and any input, schema, or tdml files used that led
to this bug.
scala.xml.parsing.FatalError: expected closing tag of xs:choice
at scala.xml.parsing.MarkupParser.errorNoEnd(MarkupParser.scala:39)
at scala.xml.parsing.MarkupParser.errorNoEnd$(MarkupParser.scala:39)
at scala.xml.parsing.ConstructingParser.errorNoEnd(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParserCommon.xEndTag(MarkupParserCommon.scala:94)
at scala.xml.parsing.MarkupParserCommon.xEndTag$(MarkupParserCommon.scala:91)
at scala.xml.parsing.ConstructingParser.xEndTag(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.element1(MarkupParser.scala:588)
at scala.xml.parsing.MarkupParser.element1$(MarkupParser.scala:572)
at scala.xml.parsing.ConstructingParser.element1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content1(MarkupParser.scala:432)
at scala.xml.parsing.MarkupParser.content1$(MarkupParser.scala:418)
at scala.xml.parsing.ConstructingParser.content1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content(MarkupParser.scala:458)
at scala.xml.parsing.MarkupParser.content$(MarkupParser.scala:441)
at scala.xml.parsing.ConstructingParser.content(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.element1(MarkupParser.scala:587)
at scala.xml.parsing.MarkupParser.element1$(MarkupParser.scala:572)
at scala.xml.parsing.ConstructingParser.element1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content1(MarkupParser.scala:432)
at scala.xml.parsing.MarkupParser.content1$(MarkupParser.scala:418)
at scala.xml.parsing.ConstructingParser.content1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content(MarkupParser.scala:458)
at scala.xml.parsing.MarkupParser.content$(MarkupParser.scala:441)
at scala.xml.parsing.ConstructingParser.content(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.element1(MarkupParser.scala:587)
at scala.xml.parsing.MarkupParser.element1$(MarkupParser.scala:572)
at scala.xml.parsing.ConstructingParser.element1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content1(MarkupParser.scala:432)
at scala.xml.parsing.MarkupParser.content1$(MarkupParser.scala:418)
at scala.xml.parsing.ConstructingParser.content1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content(MarkupParser.scala:458)
at scala.xml.parsing.MarkupParser.content$(MarkupParser.scala:441)
at scala.xml.parsing.ConstructingParser.content(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.element1(MarkupParser.scala:587)
at scala.xml.parsing.MarkupParser.element1$(MarkupParser.scala:572)
at scala.xml.parsing.ConstructingParser.element1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content1(MarkupParser.scala:432)
at scala.xml.parsing.MarkupParser.content1$(MarkupParser.scala:418)
at scala.xml.parsing.ConstructingParser.content1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content(MarkupParser.scala:458)
at scala.xml.parsing.MarkupParser.content$(MarkupParser.scala:441)
at scala.xml.parsing.ConstructingParser.content(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.element1(MarkupParser.scala:587)
at scala.xml.parsing.MarkupParser.element1$(MarkupParser.scala:572)
at scala.xml.parsing.ConstructingParser.element1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content1(MarkupParser.scala:432)
at scala.xml.parsing.MarkupParser.content1$(MarkupParser.scala:418)
at scala.xml.parsing.ConstructingParser.content1(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.content(MarkupParser.scala:458)
at scala.xml.parsing.MarkupParser.content$(MarkupParser.scala:441)
at scala.xml.parsing.ConstructingParser.content(ConstructingParser.scala:48)
at scala.xml.parsing.MarkupParser.document(MarkupParser.scala:243)
at scala.xml.parsing.MarkupParser.document$(MarkupParser.scala:224)
at scala.xml.parsing.ConstructingParser.document(ConstructingParser.scala:48)
at org.apache.daffodil.xml.DaffodilConstructingLoader.load(DaffodilConstructingLoader.scala:168)
at org.apache.daffodil.xml.DaffodilXMLLoader.load(DaffodilXMLLoader.scala:530)
at org.apache.daffodil.dsom.DFDLSchemaFile.$anonfun$loadedNode$1(DFDLSchemaFile.scala:124)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.DFDLSchemaFile.loadedNode(DFDLSchemaFile.scala:111)
at org.apache.daffodil.dsom.DFDLSchemaFile.node$lzycompute(DFDLSchemaFile.scala:134)
at org.apache.daffodil.dsom.DFDLSchemaFile.node(DFDLSchemaFile.scala:134)
at org.apache.daffodil.dsom.IIBase.$anonfun$iiSchemaFile$1(IIBase.scala:268)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.IIBase.iiSchemaFile(IIBase.scala:266)
at org.apache.daffodil.dsom.Import.$anonfun$mapPair$3(Import.scala:65)
at scala.Option.getOrElse(Option.scala:121)
at org.apache.daffodil.dsom.Import.$anonfun$mapPair$1(Import.scala:45)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.Import.mapPair(Import.scala:43)
at org.apache.daffodil.dsom.IIBase.$anonfun$notSeenThisBefore$1(IIBase.scala:140)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.IIBase.notSeenThisBefore(IIBase.scala:139)
at org.apache.daffodil.dsom.IIBase.$anonfun$iiSchemaFileMaybe$1(IIBase.scala:257)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.IIBase.iiSchemaFileMaybe(IIBase.scala:256)
at org.apache.daffodil.dsom.IIBase.$anonfun$seenAfter$1(IIBase.scala:165)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.IIBase.seenAfter(IIBase.scala:164)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.$anonfun$getImportsOrIncludes$1(SchemaDocIncludesAndImportsMixin.scala:147)
at scala.collection.TraversableOnce.$anonfun$foldLeft$1(TraversableOnce.scala:157)
at scala.collection.TraversableOnce.$anonfun$foldLeft$1$adapted(TraversableOnce.scala:157)
at scala.collection.Iterator.foreach(Iterator.scala:944)
at scala.collection.Iterator.foreach$(Iterator.scala:944)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1432)
at scala.collection.IterableLike.foreach(IterableLike.scala:71)
at scala.collection.IterableLike.foreach$(IterableLike.scala:70)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at scala.collection.TraversableOnce.foldLeft(TraversableOnce.scala:157)
at scala.collection.TraversableOnce.foldLeft$(TraversableOnce.scala:155)
at scala.collection.AbstractTraversable.foldLeft(Traversable.scala:104)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.getImportsOrIncludes(SchemaDocIncludesAndImportsMixin.scala:143)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.getImportsOrIncludes$(SchemaDocIncludesAndImportsMixin.scala:139)
at org.apache.daffodil.dsom.XMLSchemaDocument.getImportsOrIncludes(SchemaDocument.scala:64)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.$anonfun$ismli_$1(SchemaDocIncludesAndImportsMixin.scala:158)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.ismli_(SchemaDocIncludesAndImportsMixin.scala:157)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.importStatementsMap(SchemaDocIncludesAndImportsMixin.scala:155)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.importStatementsMap$(SchemaDocIncludesAndImportsMixin.scala:155)
at org.apache.daffodil.dsom.XMLSchemaDocument.importStatementsMap(SchemaDocument.scala:64)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.$anonfun$sali_$1(SchemaDocIncludesAndImportsMixin.scala:165)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.sali_(SchemaDocIncludesAndImportsMixin.scala:164)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.seenAfter(SchemaDocIncludesAndImportsMixin.scala:162)
at org.apache.daffodil.dsom.SchemaDocIncludesAndImportsMixin.seenAfter$(SchemaDocIncludesAndImportsMixin.scala:162)
at org.apache.daffodil.dsom.XMLSchemaDocument.seenAfter(SchemaDocument.scala:64)
at org.apache.daffodil.dsom.SchemaSetIncludesAndImportsMixin.$anonfun$allSchemaFiles$1(SchemaSetIncludesAndImportsMixins.scala:63)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.liftedTree1$1(OOLAG.scala:585)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value$lzycompute(OOLAG.scala:583)
at org.apache.daffodil.oolag.OOLAG$OOLAGValue.value(OOLAG.scala:581)
at org.apache.daffodil.dsom.SchemaSetIncludesAndImportsMixin.allSchemaFiles(SchemaSetIncludesAndImportsMixins.scala:61)
at org.apache.daffodil.dsom.SchemaSetIncludesAndImportsMixin.allSchemaFiles$(SchemaSetIncludesAndImportsMixins.scala:61)
at org.apache.daffodil.dsom.SchemaSet.allSchemaFiles(SchemaSet.scala:61)
at org.apache.daffodil.dsom.SchemaSet.$anonfun$isValid$2(SchemaSet.scala:128)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at org.apache.daffodil.oolag.OOLAG$.keepGoing(OOLAG.scala:60)
at org.apache.daffodil.dsom.SchemaSet.isValid$lzycompute(SchemaSet.scala:127)
at org.apache.daffodil.dsom.SchemaSet.isValid(SchemaSet.scala:126)
at org.apache.daffodil.compiler.ProcessorFactory.$anonfun$isError$3(Compiler.scala:110)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at org.apache.daffodil.oolag.OOLAG$.keepGoing(OOLAG.scala:60)
at org.apache.daffodil.compiler.ProcessorFactory.$anonfun$isError$1(Compiler.scala:109)
at scala.runtime.java8.JFunction0$mcZ$sp.apply(JFunction0$mcZ$sp.java:12)
at scala.util.DynamicVariable.withValue(DynamicVariable.scala:58)
at org.apache.daffodil.ExecutionMode$.$anonfun$usingCompilerMode$1(ExecutionMode.scala:64)
at org.apache.daffodil.compiler.ProcessorFactory.isError(Compiler.scala:109)
at org.apache.daffodil.compiler.Compiler.compileSource(Compiler.scala:336)
at org.apache.daffodil.Main$.$anonfun$createProcessorFromSchema$1(Main.scala:715)
at org.apache.daffodil.util.Timer$.getTimeResult(Timer.scala:76)
at org.apache.daffodil.util.Timer$.getResult(Timer.scala:35)
at org.apache.daffodil.Main$.createProcessorFromSchema(Main.scala:714)
at org.apache.daffodil.Main$.run(Main.scala:827)
at org.apache.daffodil.Main$.main(Main.scala:1341)
at org.apache.daffodil.Main.main(Main.scala)
Attachments
Attachments
Issue Links
- duplicates
-
DAFFODIL-1955 Missing closing dfdl:format tag causes FatalError exception
- Closed