Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-1655

ModeShape allows registering namespace prefixes that are not valid JCR names

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Blocker
    • 3.0.0.CR1
    • 3.0.0.Beta4
    • JCR
    • None

    Description

      ModeShape currently allows registering node types with prefixes that are not valid JCR names, and thus is not as strict as it needs to be. For example, if a namespace is registered with the prefix foo: (including the trailing colon character), then the prefix is stored but then ModeShape produces an error when re-starting the repository:

      13:52:32,290 ERROR Node types were read from the system content, and appear to be inconsistent or invalid: S-RAMP-Repository
      org.modeshape.jcr.value.ValueFormatException: Error converting "sramp:" from String to a Name
      	at org.modeshape.jcr.value.basic.NameValueFactory.create(NameValueFactory.java:126)
      	at org.modeshape.jcr.value.basic.NameValueFactory.create(NameValueFactory.java:55)
      	at org.modeshape.jcr.cache.document.DocumentTranslator.childReferenceFrom(DocumentTranslator.java:805)
      	at org.modeshape.jcr.cache.document.DocumentTranslator.getChildReferences(DocumentTranslator.java:744)
      	at org.modeshape.jcr.cache.document.LazyCachedNode.getChildReferences(LazyCachedNode.java:370)
      	at org.modeshape.jcr.SystemContent.readAllNamespaces(SystemContent.java:648)
      	at org.modeshape.jcr.SystemNamespaceRegistry.refreshFromSystem(SystemNamespaceRegistry.java:83)
      	at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:1083)
      	at org.modeshape.jcr.JcrRepository$RunningState.<init>(JcrRepository.java:959)
      	at org.modeshape.jcr.JcrRepository.doStart(JcrRepository.java:352)
      	at org.modeshape.jcr.JcrRepository.start(JcrRepository.java:277)
      	at org.modeshape.jcr.JcrRepositoryFactory.getRepositoryFromConfigFile(JcrRepositoryFactory.java:369)
      	at org.modeshape.jcr.JcrRepositoryFactory.getRepository(JcrRepositoryFactory.java:219)
      	at org.modeshape.jcr.JcrRepositoryFactory.getRepository(JcrRepositoryFactory.java:204)
      

      Attachments

        Activity

          People

            rhauch Randall Hauch (Inactive)
            rhauch Randall Hauch (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: