Uploaded image for project: 'Daffodil'
  1. Daffodil
  2. DAFFODIL-2044

Unexpected error on malformed config file

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1.0
    • 2.3.0
    • CLI
    • None

    Description

      When daffodil is run with a malformed config file, it reports an unexpected excpetion.

      For instance, on the config:

      <?xml version="1.0" encoding="UTF-8"?>
      <dfdlConfig xmlns="http://www.w3.org/2001/XMLSchema">
      <externalVariableBindings>
      <bind name="a:b">x</bind>
      </externalVariableBindings>
      </dfdlConfig>

      It outputs:

      !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
      !! 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.

      org.apache.daffodil.xml.QNameUndefinedPrefixException: Undefined QName prefix 'a'
      at org.apache.daffodil.xml.RefQNameFactoryBase$$anonfun$resolveRef$1.apply(QNameBase.scala:481)
      at scala.util.Try$.apply(Try.scala:192)
      at org.apache.daffodil.xml.RefQNameFactoryBase$class.resolveRef(QNameBase.scala:471)
      at org.apache.daffodil.xml.RefQNameFactory$.resolveRef(QNameBase.scala:492)
      at org.apache.daffodil.xml.QName$.resolveRef(QNameBase.scala:111)
      at org.apache.daffodil.externalvars.Binding$.apply(Binding.scala:64)
      at org.apache.daffodil.externalvars.ExternalVariablesLoader$$anonfun$getBindings$1.apply(ExternalVariablesLoader.scala:130)
      at org.apache.daffodil.externalvars.ExternalVariablesLoader$$anonfun$getBindings$1.apply(ExternalVariablesLoader.scala:130)
      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
      at scala.collection.TraversableLike$$anonfun$map$1.apply(TraversableLike.scala:234)
      at scala.collection.Iterator$class.foreach(Iterator.scala:893)
      at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
      at scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
      at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
      at scala.collection.TraversableLike$class.map(TraversableLike.scala:234)
      at scala.collection.AbstractTraversable.map(Traversable.scala:104)
      at org.apache.daffodil.externalvars.ExternalVariablesLoader$.getBindings(ExternalVariablesLoader.scala:130)
      at org.apache.daffodil.externalvars.ExternalVariablesLoader$.getVariables(ExternalVariablesLoader.scala:60)
      at org.apache.daffodil.Main$.retrieveExternalVariables(Main.scala:627)
      at org.apache.daffodil.Main$.run(Main.scala:821)
      at org.apache.daffodil.Main$.main(Main.scala:1297)
      at org.apache.daffodil.Main.main(Main.scala)

      Attachments

        Activity

          People

            dfthompson Dave Thompson
            brandon.sloane Brandon Sloane
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: