Uploaded image for project: 'Service Packs and Hot Fixes'
  1. Service Packs and Hot Fixes
  2. MNT-15815

CLONE - Dictionary should not allow duplication of namespace prefixes

    Details

      Description

      If two models, using different namespaces but the same prefix, are loaded, the second one will take over the prefix and render the first model unusable.

      See fallout from ACE-5111:

      2016-02-11 16:52:24,861 TRACE [org.alfresco.repo.dictionary.DictionaryDAO] Registered core namespace: 'http://www.alfresco.org/model/content/smartfolder/1.0' (prefix 'sf')
      ...
      2016-02-11 16:52:24,704 TRACE [org.alfresco.repo.dictionary.DictionaryDAO] Registered core namespace: 'http://www.alfresco.org/model/content/smartfolder/1.0' (prefix 'sf')
      ...
      2016-02-11 16:52:36,467 ERROR [org.springframework.web.context.ContextLoader] Context initialization failed
      org.alfresco.service.namespace.NamespaceException: A namespace prefix is not registered for uri http://www.alfresco.org/model/content/smartfolder/1.0
              at org.alfresco.service.namespace.QName.toPrefixString(QName.java:417)
              at org.alfresco.opencmis.mapping.CMISMapping.getCmisTypeId(CMISMapping.java:313)
              at org.alfresco.opencmis.dictionary.CMISStrictDictionaryService.createTypeDef(CMISStrictDictionaryService.java:214)
              at org.alfresco.opencmis.dictionary.CMISStrictDictionaryService.createTypeDefs(CMISStrictDictionaryService.java:249)
              at org.alfresco.opencmis.dictionary.CMISStrictDictionaryService.access$000(CMISStrictDictionaryService.java:49)
              at org.alfresco.opencmis.dictionary.CMISStrictDictionaryService$1.createDefinitions(CMISStrictDictionaryService.java:66)
              at org.alfresco.opencmis.dictionary.CMISDictionaryRegistryImpl.init(CMISDictionaryRegistryImpl.java:391)
              at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.createCoreDictionaryRegistry(CMISAbstractDictionaryService.java:243)
              at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.createDictionaryRegistry(CMISAbstractDictionaryService.java:281)
              at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.createDictionaryRegistryWithWriteLock(CMISAbstractDictionaryService.java:264)
              at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.afterDictionaryInit(CMISAbstractDictionaryService.java:461)
              at org.alfresco.opencmis.dictionary.CMISAbstractDictionaryService.onBootstrap(CMISAbstractDictionaryService.java:202)
      

      This is not a blocker because the product should not start - and does not start - under these conditions. However, the error should be detected in the dictionary with an appropriate message about exactly what is going on and which model URLs are in play.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                closedbugs Closed Bugs
                Reporter:
                dhulley Derek Hulley [X] (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 6 hours, 12 minutes
                  6h 12m