Uploaded image for project: 'Derby'
  1. Derby
  2. DERBY-2350

Use of XML values in the action statement of a trigger throw exceptions.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 10.3.1.4
    • 10.3.1.4
    • SQL
    • None

    Description

      A trigger like, where V, V1 and V2 are columns of type XML will thrown an exception when fired.

      CREATE TRIGGER AIS AFTER INSERT ON T_MAIN
      REFERENCING NEW_TABLE AS N
      FOR EACH STATEMENT
      INSERT INTO T_ACTION_STATEMENT(A, V1, ID, V2)
      SELECT 'I', V, ID, V FROM N

      ERROR 38000: The exception 'java.sql.SQLException: An attempt was made to get a data value of type 'java.lang.Object' from a data value of type 'XML'.' was thrown while evaluating an expression.

      Most likely because triggers are implementing using VTIs and hence JDBC ResultSets and XML is not supported through JDBC yet.

      TriggerTest shows this issue, see the comment with the bug number to reproduce.

      Attachments

        1. d2350_v2.patch
          10 kB
          A B
        2. derby-2350.diff
          6 kB
          Mike Matrigali

        Activity

          People

            mikem Mike Matrigali
            djd Daniel John Debrunner
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: