Robert Munteanu created SLING-4035: -------------------------------------- Summary: Changing the jcr primary type does not work if properties are added Key: SLING-4035 URL: https://issues.apache.org/jira/browse/SLING-4035 Project: Sling Issue Type: Bug Components: IDE Affects Versions: Sling Eclipse IDE 1.0.2 Reporter: Robert Munteanu Fix For: Sling Eclipse IDE 1.0.4
If a node already exists with a certain node type, for instance nt:folder and the IDE tooling tries to update it and also add a property incompatible with the existing node primary type, e.g. {code:xml} <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:vlt="http://www.day.com/jcr/vault/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="sling:Folder" sling:resourceType="bla/some/sample"> </jcr:root> {code} the publish operation will fail with {noformat}Failed publishing path=/content, result=JcrResult[ success:false, exception: org.apache.sling.ide.transport.RepositoryException - javax.jcr.nodetype.ConstraintViolationException: no matching property definition found for {http://sling.apache.org/jcr/sling/1.0}resourceType]{noformat} The workaround is to delete the existing node, but that's not always possible or obvious. We should be able to tweak the code to be smarter about changing node types. Some situations to validate: - upgrading a node, e.g. nt:folder to sling:Folder with property added - downgrading a node, e.g. sling:Folder to nt:folder with existing property -- This message was sent by Atlassian JIRA (v6.3.4#6332)