Uploaded image for project: '[Read Only] - Hippo Repository'
  1. [Read Only] - Hippo Repository
  2. REPO-1669

Support for empty namespace on loading CNDs

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 5.0.0
    • None
    • None
    • Platform Sprint 156: Export

    Description

      There is a bug in the HippoCompactNodeTypeDefReader where it doesn't allow using the empty namespace for named properties or child node definitions.

      For example the following will fail to load:

      <'myhippoproject'='http://www.onehippo.org/myhippoproject/nt/1.0'>
      <'nt'='http://www.jcp.org/jcr/nt/1.0'>
      [myhippoproject:test] > nt:base
      - foo (string) 
      

      with (ultimately) the following exception:

      Caused by: javax.jcr.NamespaceException: No URI for prefix '' declared.
              at org.apache.jackrabbit.spi.commons.namespace.NamespaceMapping.getURI(NamespaceMapping.java:74)
              ...
              at org.apache.jackrabbit.commons.cnd.CompactNodeTypeDefReader.<init>(CompactNodeTypeDefReader.java:163)
              at org.hippoecm.repository.jackrabbit.HippoCompactNodeTypeDefReader.<init>(HippoCompactNodeTypeDefReader.java:41)

      The HippoCompactNodeTypeDefReader extends the JR CompactNodeTypeDefReader which can handle and support the empty namespace but for that it requires to be constructed with a NamespaceResolver (which then will resolve the empty namespace for it).
      Which we forgot to do, and thus is the bug to fix.

       

      Attachments

        Issue Links

          Activity

            People

              PCentgraf Peter Centgraf
              adouma Ate Douma
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: