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

NPE when removing inexistent property from checked in node

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.6.0
    • Fix Version/s: 1.7.3, 1.6.3, 1.8.0
    • Component/s: jcr
    • Labels:
      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

            People

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

              Dates

              • Created:
                Updated:
                Resolved: