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

Error cloning nodes with autocreated mandatory subnodes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Blocker Blocker
    • 3.7.0.Final
    • 3.6.0.Final
    • JCR
    • None

      If we try to clone node which has autocreated mandatory subnodes exception is thrown

      javax.jcr.nodetype.ConstraintViolationException: The node at "/a/autocreatedChildren/Eeee" with UUID "820c8b2a-991e-4fa8-af41-e5fbfb419c0a" exists in the current workspace but cannot be removed because it is a mandatory child node
      

      Clone method is called like:

      workspace.clone(workspace.getName(), "/a/autocreatedChildren", "/b/clone", false);
      

      Segment of java doc from clone method:

      *removeExisting* if false then this method throws an ItemExistsException on identifier conflict with an incoming node. 
      

      Another exception is thrown

              Unassigned Unassigned
              Veskop86 Veselin Perovic (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: