Jackrabbit Content Repository
  1. Jackrabbit Content Repository
  2. JCR-2723

Exception when missing namespace in CND file should have clearer message

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1, 2.1.1
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      Using the attached CND file, when calling CndImporter.registerNodeTypes(..) the following message is in the returned exception:

      "Unable to parse CND Input: Error setting name of sling:resourceType to sling:resourceType (bundle://23.0:0/SLING-INF/nodetypes/types.cnd, line 24)"

      The issue with line 24 is that the "sling" namespace has not been included. The message should state that a namespace is missing and what prefix is not understood.

      1. types-bad.cnd
        0.7 kB
        Carl Hall
      2. types-good.cnd
        0.7 kB
        Carl Hall

        Activity

        Jukka Zitting made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Stefan Guggisberg made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2.0 [ 12314844 ]
        Resolution Fixed [ 1 ]
        Hide
        Stefan Guggisberg added a comment -

        fixed in svn r99544

        Show
        Stefan Guggisberg added a comment - fixed in svn r99544
        Stefan Liebig committed 995454 (1 file)
        Reviews: none

        JCR-2723: Exception when missing namespace in CND file should have clearer message

        Carl Hall made changes -
        Field Original Value New Value
        Attachment types-good.cnd [ 12452712 ]
        Attachment types-bad.cnd [ 12452711 ]
        Hide
        Carl Hall added a comment -

        types-bad.cnd is missing a namespace and causes the error noted in the description.
        types.good.cnd contains the "sling" namespace and doesn't cause an exception when importing.

        Show
        Carl Hall added a comment - types-bad.cnd is missing a namespace and causes the error noted in the description. types.good.cnd contains the "sling" namespace and doesn't cause an exception when importing.
        Carl Hall created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Carl Hall
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development