Uploaded image for project: 'Teiid Designer'
  1. Teiid Designer
  2. TEIIDDES-557

VDB archives use absolute paths for model files

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.1
    • 7.0
    • VDB & Execution
    • None

      I've been looking at the structure of the VDB files, and although they appear to be in standard JAR format, the archive structure doesn't seem right. Here's the archive listing of one recently-created VDB file:

      $ jar -tf PartsFromXml.vdb
      META-INF/vdb.xml
      /XmlParts/PartsData.xmi
      runtime-inf/1200573655.INDEX
      /XmlParts/PartsView.xmi
      runtime-inf/1842644986.INDEX

      Notice the leading '/' on the model files, which is not correct. Here's what I see when I extract the contents:

      $ ls -la
      total 16
      drwxr-xr-x 3 rhauch rhauch 102B Aug 14 10:34 ./
      drwxr-xr-x 16 rhauch rhauch 544B Aug 14 10:34 ../
      rw-rr-@ 1 rhauch rhauch 5.5K Aug 14 10:34 PartsFromXml.vdb

      $ jar -xvf PartsFromXml.vdb
      inflated: META-INF/vdb.xml
      inflated: /XmlParts/PartsData.xmi
      inflated: runtime-inf/1200573655.INDEX
      inflated: /XmlParts/PartsView.xmi
      inflated: runtime-inf/1842644986.INDEX

      $ ls -la
      total 16
      drwxr-xr-x 5 rhauch rhauch 170B Aug 14 10:34 ./
      drwxr-xr-x 16 rhauch rhauch 544B Aug 14 10:34 ../
      drwxr-xr-x 3 rhauch rhauch 102B Aug 14 10:34 META-INF/
      rw-rr-@ 1 rhauch rhauch 5.5K Aug 14 10:34 PartsFromXml.vdb
      drwxr-xr-x 4 rhauch rhauch 136B Aug 14 10:34 runtime-inf/

      Notice that the models were extracted, but because of the leading '/' they were not extracted to the same location as the other files in the archive. Instead, they were extracted to the root of my file system:

      $ ls -la /XmlParts
      total 24
      drwxr-xr-x 4 rhauch admin 136 Aug 14 10:34 .
      drwxrwxr-t 35 root admin 1258 Aug 14 10:34 ..
      rw-rr- 1 rhauch admin 2367 Aug 11 09:27 PartsData.xmi
      rw-rr- 1 rhauch admin 5534 Aug 11 09:27 PartsView.xmi

      The entries for the models should be relative (like the rest of the JAR entries) and should not have a leading '/'.

            blafond Barry LaFond
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: