Derby
  1. Derby
  2. DERBY-1775

Error 2200M is defined in the SQL standard as 'invalid XML document' and can be used in multiple situations, not just XMLPARSE

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 10.2.1.6, 10.3.1.4
    • Fix Version/s: 10.2.1.6, 10.3.1.4
    • Component/s: SQL
    • Labels:
      None

      Description

      Derby's text for 2200M is as below, probably should start out being more generic. Also based upon past error messages like this ('see next for details') it's probably best to include the text of the next message in the first, while continuing to chain them.

      Consider replacing:

      ERROR 2200M: Failed to parse XMLPARSE operand; see next exception for details.
      ERROR XJ001: Java exception: 'Element type "idtwo" must be followed by either at
      tribute specifications, ">" or "/>".: org.xml.sax.SAXException'.

      with

      ERROR 2200M: Invalid XML DOCUMENT : Element type "idtwo" must be followed by either at
      tribute specifications, ">" or "/>".: org.xml.sax.SAXException'.
      ERROR XJ001: Java exception: 'Element type "idtwo" must be followed by either at
      tribute specifications, ">" or "/>".: org.xml.sax.SAXException'.

      1. d1775_v2.patch
        14 kB
        A B
      2. d1775_v1.patch
        14 kB
        A B

        Activity

        Hide
        A B added a comment -

        Attaching a patch that does the following:

        1. Updates the 2200M message text to be more generic,
        as suggested in the description of this issue.

        2. Replaces "see next exception" with the in-lined
        error message while continuing to do exception
        chaining as usual.

        3. Also replaces "see next exception" with in-line
        error messages for a couple of other SQL/XML
        errors--namely UNEXPECTED_XML_ERROR and
        XML_QUERY_ERROR.

        I ran xmlSuite on Windows 2000 using ibm142 and all tests passed.

        NOTE: This patch has a one-line conflict with the patch posted for DERBY-1772. When either patch is committed, the other will have to be regenerated to resolve the conflict.

        Show
        A B added a comment - Attaching a patch that does the following: 1. Updates the 2200M message text to be more generic, as suggested in the description of this issue. 2. Replaces "see next exception" with the in-lined error message while continuing to do exception chaining as usual. 3. Also replaces "see next exception" with in-line error messages for a couple of other SQL/XML errors--namely UNEXPECTED_XML_ERROR and XML_QUERY_ERROR. I ran xmlSuite on Windows 2000 using ibm142 and all tests passed. NOTE: This patch has a one-line conflict with the patch posted for DERBY-1772 . When either patch is committed, the other will have to be regenerated to resolve the conflict.
        Hide
        Mike Matrigali added a comment -

        I committed derby-1772, could you regenerate a new updated patch for this issue to resolve the conflict detailed in the comments above?

        Show
        Mike Matrigali added a comment - I committed derby-1772, could you regenerate a new updated patch for this issue to resolve the conflict detailed in the comments above?
        Hide
        A B added a comment -

        Thank you for committing the DERBY-1772 patch (and the DERBY-1776 patch, as well!), Mike. I'm attaching a new patch for this issue that resolves the conflict with DERBY-1772. I applied the patch and ran xmlSuite on Windows 2000 (ibm142) with no failures.

        Show
        A B added a comment - Thank you for committing the DERBY-1772 patch (and the DERBY-1776 patch, as well!), Mike. I'm attaching a new patch for this issue that resolves the conflict with DERBY-1772 . I applied the patch and ran xmlSuite on Windows 2000 (ibm142) with no failures.
        Hide
        Mike Matrigali added a comment -

        committed the latest patch to the trunk, this can be merged to 10.2.

        m1_ibm142:123>svn commit

        Sending java\engine\org\apache\derby\iapi\types\SqlXmlUtil.java
        Sending java\engine\org\apache\derby\iapi\types\XML.java
        Sending java\engine\org\apache\derby\loc\messages_en.properties
        Sending java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\xml_general.out
        Sending java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\xml_general.out
        Sending java\testing\org\apache\derbyTesting\functionTests\master\xml_general.out
        Transmitting file data ......
        Committed revision 448258.

        Show
        Mike Matrigali added a comment - committed the latest patch to the trunk, this can be merged to 10.2. m1_ibm142:123>svn commit Sending java\engine\org\apache\derby\iapi\types\SqlXmlUtil.java Sending java\engine\org\apache\derby\iapi\types\XML.java Sending java\engine\org\apache\derby\loc\messages_en.properties Sending java\testing\org\apache\derbyTesting\functionTests\master\DerbyNet\xml_general.out Sending java\testing\org\apache\derbyTesting\functionTests\master\DerbyNetClient\xml_general.out Sending java\testing\org\apache\derbyTesting\functionTests\master\xml_general.out Transmitting file data ...... Committed revision 448258.
        Hide
        Mike Matrigali added a comment -

        marking it a candidate for merge to 10.2

        Show
        Mike Matrigali added a comment - marking it a candidate for merge to 10.2
        Hide
        A B added a comment -

        Patch has now been mega-merged to 10.2. I ran xmlSuite on Windows 2000 with ibm142 to make sure all is well, and also manually verified that the changes are in. So I'm setting Fixin, unchecking "Patch Available", and resolving this issue.

        Show
        A B added a comment - Patch has now been mega-merged to 10.2. I ran xmlSuite on Windows 2000 with ibm142 to make sure all is well, and also manually verified that the changes are in. So I'm setting Fixin, unchecking "Patch Available", and resolving this issue.
        Hide
        A B added a comment -

        Changes in trunk and 10.2 and no further comments, so closing the issue.

        Show
        A B added a comment - Changes in trunk and 10.2 and no further comments, so closing the issue.

          People

          • Assignee:
            A B
            Reporter:
            Daniel John Debrunner
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development