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

MicroKernel.commit() throws NotFoundException for an existing node

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.6
    • mk, mongomk
    • None

    Description

      String base = mk.commit("", "+\"/a\":{}", null, null);
      mk.commit("", "-\"/a\"", base, null);
      assertTrue(mk.nodeExists("/a", base));
      mk.commit("", "-\"/a\"", base, null);
      

      The last line throws an MicroKernelException with a NotFoundException as its cause, which contradicts the preceding assertion.

      Exception in thread "main" org.apache.jackrabbit.mk.api.MicroKernelException: org.apache.jackrabbit.mk.store.NotFoundException: /a
      	at org.apache.jackrabbit.mk.core.MicroKernelImpl.commit(MicroKernelImpl.java:499)
      	at org.apache.jackrabbit.oak.core.Rebase.testFoo(Rebase.java:587)
      	at org.apache.jackrabbit.oak.core.Rebase.main(Rebase.java:577)
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      	at java.lang.reflect.Method.invoke(Method.java:597)
      	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
      Caused by: org.apache.jackrabbit.mk.store.NotFoundException: /a
      	at org.apache.jackrabbit.mk.model.StagedNodeTree.remove(StagedNodeTree.java:148)
      	at org.apache.jackrabbit.mk.model.CommitBuilder$RemoveNode.apply(CommitBuilder.java:293)
      	at org.apache.jackrabbit.mk.model.CommitBuilder.doCommit(CommitBuilder.java:120)
      	at org.apache.jackrabbit.mk.model.CommitBuilder.doCommit(CommitBuilder.java:94)
      	at org.apache.jackrabbit.mk.core.MicroKernelImpl.commit(MicroKernelImpl.java:489)
      

      Attachments

        1. OAK-507.patch
          18 kB
          Marcel Reutegger
        2. OAK-507.patch
          27 kB
          Marcel Reutegger

        Issue Links

          Activity

            People

              Unassigned Unassigned
              mduerig Michael Dürig
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: