Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3763

Import XML fails with jackrabbit webapp deployed

    XMLWordPrintableJSON

Details

    Description

      UPDATE: this seems to be very similar to the issue reported in:

      https://issues.apache.org/jira/browse/JCR-3668

      To reproduce simply deploy jackrabbit-webapp-2.6.2 or greater (haven't tested on earlier versions). I have also confirmed this issue persists with jackrabbit-webapp-2.7.5. The standalone versions do not have this issue.

      With the webapp deployed, attempt to import serialized XML using session.importXML or workspace.importXML( ... ) fails. Note: this XML is initially serialized from existing Jackrabbit node data via session.exportSystem( ... ).

      When your session or workspace points to the jackrabbit-standalone configuration the import is successful and the node structure is generated on the server. When your session points to the webapp config, the process fails because:

      DavLocatorFactoryImpl.getRepositoryPath() is returning the incorrect workspace path. In this example, the workspace is "default". The trace:

      SEVERE: Servlet.service() for servlet [JCRWebdavServer] in context with path [/jackrabbit-webapp-2.7.5] threw exception
      java.lang.IllegalArgumentException: Unexpected format of resource path: /jackrabbit-webapp-2.7.5/server/default/jcr:root/8b65d019-719f-47ec-ae2b-675c7a33048c/RTRD (workspace: /jackrabbit-webapp-2.7.5)
              at org.apache.jackrabbit.webdav.jcr.DavLocatorFactoryImpl.getRepositoryPath(DavLocatorFactoryImpl.java:65)
              at org.apache.jackrabbit.webdav.AbstractLocatorFactory$DavResourceLocatorImpl.getRepositoryPath(AbstractLocatorFactory.java:356)
              at org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport.addResponses(JcrPrivilegeReport.java:117)
              at org.apache.jackrabbit.webdav.jcr.version.report.JcrPrivilegeReport.init(JcrPrivilegeReport.java:102)
              at org.apache.jackrabbit.webdav.version.report.ReportType.createReport(ReportType.java:72)
              at org.apache.jackrabbit.webdav.jcr.AbstractResource.getReport(AbstractResource.java:487)
              at org.apache.jackrabbit.webdav.jcr.WorkspaceResourceImpl.getReport(WorkspaceResourceImpl.java:84)
              at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.doReport(AbstractWebdavServlet.java:1096)
              at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.execute(AbstractWebdavServlet.java:402)
              at org.apache.jackrabbit.webdav.server.AbstractWebdavServlet.service(AbstractWebdavServlet.java:291)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:728)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
              at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
              at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
              at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
              at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:662) 
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              crm6360 Chris
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: