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

BLOB/CLOB errors while using teiid 7.6 JDBC

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 7.7
    • 7.6
    • None
    • None

      Hi,

      We have recently upgraded to teiid 7.6 on our environment, and we have noticed that a few users have been reporting problems querying data via JDBC surrounding blobs/clobs.

      The fields in the VDB model are marked as MEDIUMTEXT, but when trying to run an example query such as

      select bug_id, keywords from bugzilla.bugs order by bug_id limit 1000;
      

      In squirrel you just get the values back as <Clob> (not the real value) and in dbvisualiser you get back CLOB in the field with the following errors

      [cleared]
      ting clob data: 
      08:53:42 [ERROR Thread-22 TextData.getData] javax.sql.rowset.serial.SerialException: Invalid position in BLOB object set
      08:53:42 [ERROR Thread-22 TextData.getData] Error getting clob data: 
      08:53:42 [ERROR Thread-22 TextData.getData] javax.sql.rowset.serial.SerialException: Invalid position in BLOB object set
      08:53:42 [ERROR Thread-22 TextData.getData] Error getting clob data: 
      08:53:42 [ERROR Thread-22 TextData.getData] javax.sql.rowset.serial.SerialException: Invalid position in BLOB object set
      08:53:42 [ERROR Thread-22 TextData.getData] Error getting clob data: 
      08:53:42 [ERROR Thread-22 TextData.getData] javax.sql.rowset.serial.SerialException: Invalid position in BLOB object set
      08:53:42 [ERROR Thread-22 TextData.getData] Error getting clob data: 
      08:53:42 [ERROR Thread-22 TextData.getData] javax.sql.rowset.serial.SerialException: Invalid position in BLOB object set
      08:53:42 [ERROR Thread-22 TextData.getData] Error getting clob data: 
      

      Another query giving us grief is

      SELECT
      p.plan_id,
      p.product_id,
      p.author_id,
      p.type_id,
      v.id as default_product_version,
      p.name,
      p.creation_date,
      p.isactive,
      p.extra_link,
      p.parent_id
      FROM testopia.test_plans p
      left join testopia.versions v
      on
      p.product_id = v.product_id and
      p.default_product_version = v.value
      where p.creation_date>= '2012-02-05'
      

      which gives the error

      ERROR:  Expressions of type OBJECT, CLOB, BLOB, or XML cannot be used in comparison: p.default_product_version = v."value".
      DETAIL:  org.teiid.jdbc.TeiidSQLException: Expressions of type OBJECT, CLOB, BLOB, or XML cannot be used in comparison: p.default_product_version = v."value".
      

      We updated our VDB models using teiid designer 7.6 at the same time we updated teiid to 7.6, so it could be something we have changed there. Have we got the wrong type set for these fields (should they not be MEDIUMTEXT) or is this a bug in the driver or in teiid?

      Regards,

      Graeme

              rhn-engineering-shawkins Steven Hawkins
              graeme.gillies Graeme Gillies (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: