Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DFDL-1701

dfdl:outputValueCalc on a complex element causes a ClassCastException

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: deferred
    • Component/s: Front End, General
    • Labels:
      None

      Description

      I accidentally put on outputValueCalc on and element reference that referenced a complex element. This resulted in a ClassCastException since it tried to get the primitive type when compiling the OVC.

      java.lang.ClassCastException: edu.illinois.ncsa.daffodil.dsom.LocalComplexTypeDef cannot be cast to edu.illinois.ncsa.daffodil.dsom.SimpleTypeBase
      	at edu.illinois.ncsa.daffodil.grammar.ElementBaseGrammarMixin$class.primType(ElementBaseGrammarMixin.scala:577)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.primType$lzycompute(ElementBase.scala:78)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.primType(ElementBase.scala:78)
      	at edu.illinois.ncsa.daffodil.grammar.ElementBaseGrammarMixin$class.ovcCompiledExpression(ElementBaseGrammarMixin.scala:981)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.ovcCompiledExpression$lzycompute(ElementBase.scala:78)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.ovcCompiledExpression(ElementBase.scala:78)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.calcContentUnparserReferencedElementInfos(ElementBase.scala:130)
      	at edu.illinois.ncsa.daffodil.dsom.RealTermMixin$class.contentLengthUnparserReferencedElementInfos(RealTermMixin.scala:252)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.contentLengthUnparserReferencedElementInfos$lzycompute(ElementBase.scala:78)
      	at edu.illinois.ncsa.daffodil.dsom.ElementBase.contentLengthUnparserReferencedElementInfos(ElementBase.scala:78)

        Gliffy Diagrams

          Attachments

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              slawrence Steve Lawrence
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:

                  Tasks