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

XCatalog and Classpath interaction with name resolution

XMLWordPrintableJSON

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Normal Normal
    • deferred
    • None
    • Front End, General
    • None

      I ran test_multifile_cyclical with the following entries in my xcatalog file:

        <uri name="http://stepSchema.com"
          uri="daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/cycle_step.dfdl.xsd" />
        <uri name="http://baseSchema.com"
          uri="daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/cycle_base.dfdl.xsd" />

      and the following error occurs:

      [error] Test edu.illinois.ncsa.daffodil.section06.namespaces.TestNamespaces.test_multifile_cyclical failed: java.lang.Exception: Did not find diagnostic message "Cyclical" in any of the actual diagnostic messages: 
      [error] Schema Definition Error: More than one definition for name: elem. Defined in following locations:
      [error] Location line 16 column 27 in file:/home/jchab/NGF/dfdl/daffodil-test/target/scala-2.10/test-classes/edu/illinois/ncsa/daffodil/section06/namespaces/cycle_base.dfdl.xsd
      [error] Location line 16 column 27 in file:////home/jchab/NGF/dfdl/daffodil-test/src/test/resources/edu/illinois/ncsa/daffodil/section06/namespaces/cycle_base.dfdl.xsd
      [error] Schema context: SchemaSet. Location in file:/home/jchab/NGF/dfdl/daffodil-test/target/scala-2.10/test-classes/edu/illinois/ncsa/daffodil/section06/namespaces/cycle_base.dfdl.xsd.
      [error]     at edu.illinois.ncsa.daffodil.tdml.TestCase$$anonfun$verifyAllDiagnosticsFound$1.apply(TDMLRunner.scala:496)
      [error]     at edu.illinois.ncsa.daffodil.tdml.TestCase$$anonfun$verifyAllDiagnosticsFound$1.apply(TDMLRunner.scala:490)
      [error]     at scala.collection.immutable.List.foreach(List.scala:318)
      [error]     at edu.illinois.ncsa.daffodil.tdml.TestCase.verifyAllDiagnosticsFound(TDMLRunner.scala:489)
      [error]     at edu.illinois.ncsa.daffodil.tdml.ParserTestCase.runProcessor(TDMLRunner.scala:575)
      [error]     at edu.illinois.ncsa.daffodil.tdml.TestCase.run(TDMLRunner.scala:469)
      [error]     at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTestWithDataVolumes(TDMLRunner.scala:279)
      [error]     at edu.illinois.ncsa.daffodil.tdml.DFDLTestSuite.runOneTest(TDMLRunner.scala:270)
      [error]     at edu.illinois.ncsa.daffodil.section06.namespaces.TestNamespaces.test_multifile_cyclical(TestNamespaces.scala:120)
      [error]     ...

      More information from DFDL-530:
      Note from Mike B:
      Something strange is going on here since you are seeing complaints about the duplicate and the two URIs are different in that one has file:/... the other file:////.... BTW, both are incorrect (see http://en.wikipedia.org/wiki/File_URI_scheme) in that a file URI should have two slashes if it includes a hostname, and 3 slashes if it does not have a hostname. So this should be file:///....

      Yes, there is something funny about xcatalog interacting with classpath. Like perhaps some resolutions of names to locations use the xcatalog, others use the classpath so that the same URI can resolve to two different files (that contain the same thing).

      When we validate DFDL Schemas (against the XML schema for DFDL schemas) we are using the xcatalog-capable loader. When we process our own include/imports in Daffodil code, .... I am less sure.

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

                Created:
                Updated: