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

MultiFileSchema: Diagnostic message is pointing to wrong file

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • s10
    • s7
    • Front End
    • None

      I noticed that if you define a format with an error in a property (I.e.
      calendarTimeZone="notValid"), and you reference the format in an element
      in another schema file, the Error traceback provides the element that uses
      the format as the context, and the filename that contains the definition
      of the element, not the definition of the incorrect format itself.

      Here is the Schema Definition Error (note that it's also not getting propagated
      correctly to the 'red text' area of the output:

      2013-02-26 13:03:29:997
      edu.illinois.ncsa.daffodil.compiler.ProcessorFactory Error [Compilation
      (DataProcessor) reports 1 compile errors/warnings.]
      2013-02-26 13:03:29:997
      edu.illinois.ncsa.daffodil.compiler.ProcessorFactory Error [Schema
      Definition Error: Unknown timezone specified for dfdl:calendarTimeZone:
      WrappedArray(5 o'clock somewhere) Schema context: element.date2. Location
      in
      file:/home/jchab/NGF/dfdl/daffodil-test/target/scala-2.9.2/test-classes/edu
      /illinois/ncsa/daffodil/section06/namespaces/multi_B_06.dfdl.xsd]
      [info] - test_combinations_02 *** FAILED ***
      [info] java.lang.Exception:
      [info] at
      edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runParseExpectSuccess(TDMLRu
      nner.scala:477)
      [info] at
      edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scal
      a:372)
      [info] at
      edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:326)
      [info] at
      edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:1
      98)
      [info] at
      edu.illinois.ncsa.daffodil.section06.namespaces.TestNamespaces.test_combina
      tions_02(TestNamespaces.scala:89)
      [info] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [info] at
      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
      7)
      [info] at
      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp
      l.java:43)
      [info] at java.lang.reflect.Method.invoke(Method.java:601)
      [info] at
      org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod
      .java:47)
      [info] ...

      In the file specified we have the element declaration:

      <xs:element name="date2" type="xs:date" dfdl:ref="b06:dateTZtypo"
      dfdl:calendarPattern="MM-dd-yyyy" dfdl:calendarPatternKind="explicit"/>

      But the offending formatting is in
      daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/names
      paces/subfolder/multi_C_06_nons.dfdl.xsd:

      <dfdl:defineFormat name="dateTZtypo">
      <dfdl:format ref="dateNoTZ" calendarTimeZone="5 o'clock somewhere"/>
      </dfdl:defineFormat>

      It is returning a filename (though no line number), but
      it's just the location of the element, not the formatting itself.

              jchab Jessie Chab
              jchab Jessie Chab
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: