Uploaded image for project: 'Sling'
  1. Sling
  2. SLING-1084

Moving top-level nodes fails

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • Servlets Post 2.0.2
    • Servlets Post 2.1.0
    • Servlets
    • None
    • J2SE 1.6.0_14-b08, Debian Linux

    Description

      Using the SlingPostServlet to move a node which exists at the top-level of the repository (directly under '/') fails:

      curl -X POST http://localhost:8080/a2 -u admin:admin
      curl -F ":operation=move" http://localhost:8080/a2 -F ":dest=a4" -u admin:admin

      13.08.2009 13:38:19.413 ERROR [127.0.0.1 [1250167068213] POST /d11250167067 HTTP/1.1] org.apache.sling.servlets.post.impl.operations.MoveOperation Exception during response processing. javax.jcr.RepositoryException: invalid path://d21250167067: '//d21250167067' is not a valid path. double slash '//' not allowed.: '//d21250167067' is not a valid path. double slash '//' not allowed.
      at org.apache.jackrabbit.core.SessionImpl.itemExists(SessionImpl.java:831)
      at org.apache.sling.servlets.post.impl.operations.MoveOperation.execute(MoveOperation.java:51)
      at org.apache.sling.servlets.post.impl.operations.AbstractCopyMoveOperation.doRun(AbstractCopyMoveOperation.java:110)
      at org.apache.sling.servlets.post.AbstractSlingPostOperation.run(AbstractSlingPostOperation.java:87)
      at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:172)
      at org.apache.sling.api.servlets.SlingAllMethodsServlet.mayService(SlingAllMethodsServlet.java:143)
      at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:338)
      at org.apache.sling.api.servlets.SlingSafeMethodsServlet.service(SlingSafeMethodsServlet.java:369)
      at org.apache.sling.engine.impl.request.RequestData.service(RequestData.java:520)
      at org.apache.sling.engine.impl.SlingMainServlet.processRequest(SlingMainServlet.java:409)
      at org.apache.sling.engine.impl.filter.RequestSlingFilterChain.render(RequestSlingFilterChain.java:48)

      The attached patch fixes the issue.

      Attachments

        1. patch.txt
          0.6 kB
          Arthur Taylor

        Activity

          People

            ianeboston Ian Boston
            codders Arthur Taylor
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: