Uploaded image for project: 'Jackrabbit Oak'
  1. Jackrabbit Oak
  2. OAK-9616

Node.setPrimaryType() does not always support expanded names

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.40.0
    • 1.42.0, 1.22.10, 1.8.26
    • jcr
    • None

    Description

      Node.setPrimaryType should support both qualified and expanded name format (https://www.adobe.io/experience-manager/reference-materials/spec/jcr/2.0/3_Repository_Model.html#3.2.7%20Equality%20of%20Names) but using qualified names sometimes lead to this exception

      java.lang.IllegalArgumentException: Invalid name: {http://www.jcp.org/jcr/nt/1.0}unstructured
      	at org.apache.jackrabbit.oak.spi.state.AbstractNodeState.checkValidName(AbstractNodeState.java:62)
      	at org.apache.jackrabbit.oak.plugins.memory.MemoryNodeBuilder.getChildNode(MemoryNodeBuilder.java:329)
      	at org.apache.jackrabbit.oak.core.SecureNodeBuilder.<init>(SecureNodeBuilder.java:111)
      	at org.apache.jackrabbit.oak.core.SecureNodeBuilder.getChildNode(SecureNodeBuilder.java:328)
      	at org.apache.jackrabbit.oak.core.MutableTree.createChild(MutableTree.java:91)
      	at org.apache.jackrabbit.oak.core.MutableTree.createChild(MutableTree.java:35)
      	at org.apache.jackrabbit.oak.plugins.tree.impl.AbstractTree.getChild(AbstractTree.java:240)
      	at org.apache.jackrabbit.oak.core.MutableTree.getChild(MutableTree.java:159)
      	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalSetPrimaryType(NodeImpl.java:1376)
      	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.access$700(NodeImpl.java:110)
      	at org.apache.jackrabbit.oak.jcr.session.NodeImpl$25.performVoid(NodeImpl.java:965)
      	at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:275)
      	at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setPrimaryType(NodeImpl.java:954)
      	at org.apache.jackrabbit.vault.packaging.integration.ImportIT.testKeepNodeTypeForFolderAggregate(ImportIT.java:407)
      	...
      

      Attachments

        Issue Links

          Activity

            People

              reschke Julian Reschke
              kwin Konrad Windszus
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: