You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2022/02/14 18:06:00 UTC
[jira] [Assigned] (OAK-9695) Deleting a property fails in case there is a residual protected property definition in its node type with a non-matching type
[ https://issues.apache.org/jira/browse/OAK-9695?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Konrad Windszus reassigned OAK-9695:
------------------------------------
Assignee: Konrad Windszus
> Deleting a property fails in case there is a residual protected property definition in its node type with a non-matching type
> -----------------------------------------------------------------------------------------------------------------------------
>
> Key: OAK-9695
> URL: https://issues.apache.org/jira/browse/OAK-9695
> Project: Jackrabbit Oak
> Issue Type: Bug
> Components: jcr
> Affects Versions: 1.42.0
> Reporter: Konrad Windszus
> Assignee: Konrad Windszus
> Priority: Major
>
> Given that I have defined a node type
> {code}
> [my:Folder] > nt:hierarchyNode
> - * (boolean) protected
> - * (string)
> {code}
> and I have created a node with some string properties, I can no longer remove those properties or set them to a different string value.
> It fails with
> {code}
> javax.jcr.nodetype.ConstraintViolationException: Item is protected.
> at org.apache.jackrabbit.oak.jcr.session.ItemImpl$ItemWriteOperation.checkPreconditions(ItemImpl.java:98)
> at org.apache.jackrabbit.oak.jcr.session.PropertyImpl$4.checkPreconditions(PropertyImpl.java:116)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:649)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:272)
> at org.apache.jackrabbit.oak.jcr.session.PropertyImpl.remove(PropertyImpl.java:113)
> {code}
> or
> {code}
> javax.jcr.nodetype.ConstraintViolationException: Item is protected.
> at org.apache.jackrabbit.oak.jcr.session.ItemImpl$ItemWriteOperation.checkPreconditions(ItemImpl.java:98)
> at org.apache.jackrabbit.oak.jcr.session.PropertyImpl$12.checkPreconditions(PropertyImpl.java:466)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:649)
> at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.performVoid(SessionDelegate.java:272)
> at org.apache.jackrabbit.oak.jcr.session.PropertyImpl.internalSetValue(PropertyImpl.java:463)
> at org.apache.jackrabbit.oak.jcr.session.PropertyImpl.setValue(PropertyImpl.java:147)
> at org.apache.jackrabbit.oak.jcr.session.PropertyImpl.setValue(PropertyImpl.java:165)
> {code}
> This is due to the missing type check in https://github.com/apache/jackrabbit-oak/blob/24b5ea76758a7fd2bf6cf4598d2aaabe87250fb7/oak-jcr/src/main/java/org/apache/jackrabbit/oak/jcr/delegate/NodeDelegate.java#L218.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)