[ https://issues.apache.org/jira/browse/OAK-9436?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Miroslav Smiljanic updated OAK-9436: ------------------------------------ Fix Version/s: (was: 1.40.0) > Session.getImportContentHandler() adds new nodes/properties to transient > space despite ConstraintViolationException > -------------------------------------------------------------------------------------------------------------------- > > Key: OAK-9436 > URL: https://issues.apache.org/jira/browse/OAK-9436 > Project: Jackrabbit Oak > Issue Type: Bug > Components: jcr > Affects Versions: 1.38.0 > Reporter: Konrad Windszus > Assignee: Konrad Windszus > Priority: Major > > When Session.getImportContentHandler tries to add a new child node which is > not allowed due to the parent node's node type definition a {{SAXException}} > is thrown wrapping a {{ConstraintViolationException}}. Still the new node has > already been added to the transient space of that session as with > {{Session.save()}} the exact same exception is thrown again. > {code} > javax.jcr.nodetype.ConstraintViolationException: No matching node definition > found for new at > org.apache.jackrabbit.oak.plugins.nodetype.EffectiveNodeTypeImpl.getNodeDefinition(EffectiveNodeTypeImpl.java:461) > at > org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager.getDefinition(ReadOnlyNodeTypeManager.java:396) > at > org.apache.jackrabbit.oak.jcr.xml.ImporterImpl.getDefinition(ImporterImpl.java:547) > at > org.apache.jackrabbit.oak.jcr.xml.ImporterImpl.endNode(ImporterImpl.java:482) > at > org.apache.jackrabbit.oak.jcr.xml.SysViewImportHandler.processNode(SysViewImportHandler.java:89) > {code} > Jackrabbit 2 throws the {{ConstrantViolationException}} as well but won't add > the new (invalid) node to the transient space. > The same happens for properties which are not valid according to the node > type definition. -- This message was sent by Atlassian Jira (v8.3.4#803005)