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

NPE when removing inexistent property from checked in node

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.6.0
    • 1.7.3, 1.6.3, 1.8.0
    • jcr
    • None

    Description

      While running AEM 6.3 which uses oak 1.6.1 the following exception was seen in the logs:
      Stacktrace:
      java.lang.NullPointerException: null
      at org.apache.jackrabbit.oak.jcr.session.NodeImpl$37.checkPreconditions(NodeImpl.java:1449)
      at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.prePerform(SessionDelegate.java:615)
      at org.apache.jackrabbit.oak.jcr.delegate.SessionDelegate.perform(SessionDelegate.java:205)
      at org.apache.jackrabbit.oak.jcr.session.ItemImpl.perform(ItemImpl.java:112)
      at org.apache.jackrabbit.oak.jcr.session.NodeImpl.internalRemoveProperty(NodeImpl.java:1444)
      at org.apache.jackrabbit.oak.jcr.session.NodeImpl.setProperty(NodeImpl.java:354)
      ....... AEM Code

      I have reproduced the NPE with the following code:

      Node parent = session.getRootNode().addNode("parent", "nt:unstructured");
      Node child = parent.addNode("child", "nt:unstructured");
      child.addMixin("mix:versionable");
      session.save();
      session.getWorkspace().getVersionManager().checkin(child.getPath());
      Node node = (Node) session.getItem("/parent/child");
      node.setProperty("inexistent", (Value) null);
      

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            mreutegg Marcel Reutegger
            ioancris Ioan-Cristian Linte
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment