You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Tommaso Teofili (JIRA)" <ji...@apache.org> on 2017/01/19 10:19:26 UTC

[jira] [Created] (SLING-6477) Distributing with sling.jcr.api 2.2.0 should not throw NSME

Tommaso Teofili created SLING-6477:
--------------------------------------

             Summary: Distributing with sling.jcr.api 2.2.0 should not throw NSME
                 Key: SLING-6477
                 URL: https://issues.apache.org/jira/browse/SLING-6477
             Project: Sling
          Issue Type: Bug
          Components: Content Distribution
    Affects Versions: Content Distribution Core 0.1.10
            Reporter: Tommaso Teofili
            Assignee: Tommaso Teofili
             Fix For: Content Distribution 0.2.0


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:
{noformat}
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)
{noformat}

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



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)