Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5573

Ending a teiid odata url with a slash causes a 'Malformed URI' error

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 11.1.2, 12.0, 11.2.2
    • 9.1.1
    • OData
    • None

      As discussed on #teiid (IRC), the URI used to access a teiid odata service fails if a '/' is appended to it, eg.

      https://${HOST}:${PORT}/odata4/usstates/USStates/SvcView/
      

      This results in this error (in Chrome):

      <error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
        <script/>
        <code>null</code>
        <message>The URI is malformed.</message>
      </error>
      

      Removing the '/' works correctly.

      This appears to be an underlying problem with the olingo4 libraries since the tutorial when implemented suffers the same error.

      However, the odata.org reference implementation does handle the slash correctly.

      Why does this matter?
      The camel-odata connector uses the olingo4 libraries and positively adds a '/' when forming the full URI to read data. This camel connector was originally created using the reference odata implementation as test data so unsurprising that it assumes the extra '/'.

      Who should fix what?
      Probably, the olingo4 libraries should be fixed to correctly handle the extra '/'. However, that would require both teiid and the camel odata-connector picking up a new version of the library, which may well take some time. From the discussion on IRC, it is possible to workaround this in teiid with the use of 'servlet filters'.

      Tested version
      The version of teiid actually tested is 9.1.1 but would imagine that later versions may also be affected given it is ultimately a problem with the olingo4 libraries.

              rhn-engineering-shawkins Steven Hawkins
              parichar@redhat.com Paul Richardson
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: