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

Distributing with sling.jcr.api 2.2.0 should not throw NSME

    XMLWordPrintableJSON

Details

    Description

      In SLING-5281 we introduced capability of distributing with user session, however that requires sling.jcr.api-2.3.0 because of SlingRepository#impersonateFromService. In SLING-5633 the dependency to sling.jcr.api was moved from version 2.3.0 to 2.2.0 as to allow installation on older repositories.
      On such old repos if an agent uses the calling user session the following Error appears:

      Error executing handler
      SimpleDistributionRequest{requestType=PULL, paths=[null]}
      java.lang.NoSuchMethodError:
      org.apache.sling.jcr.api.SlingRepository.impersonateFromService(Ljava/lang/
      String;Ljavax/jcr/Credentials;Ljava/lang/String;)Ljavax/jcr/Session;
      	at 
      org.apache.sling.distribution.util.impl.DistributionUtils.getResourceResolv
      er(DistributionUtils.java:89)
      

      We should fallback to using the service user to login in such cases as to avoid such errors.

      Attachments

        Activity

          People

            marett Timothee Maret
            teofili Tommaso Teofili
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: