[
https://issues.apache.org/jira/browse/SLING-4932?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Stefan Seifert resolved SLING-4932.
-----------------------------------
Resolution: Fixed
Assignee: Stefan Seifert
Completed: At revision: 1695774
i switched dependency back to old API and jcr.resource version, and changed the
registration of the PathMapper service to use reflection. it is registered only
if it exists. the project that uses it then has to ensure it declares matching
dependencies for both jcr.resource and api bundle. if old versions are used
PathMapper services is not registered.
it think this should solve your problem.
> Sling Mock: Make compatible with o.a.s.jcr.resource 2.5.0
> ---------------------------------------------------------
>
> Key: SLING-4932
> URL: https://issues.apache.org/jira/browse/SLING-4932
> Project: Sling
> Issue Type: Improvement
> Components: Testing
> Affects Versions: Testing Sling Mock 1.4.0
> Reporter: Konrad Windszus
> Assignee: Stefan Seifert
> Fix For: Testing Sling Mock 1.4.2
>
>
> Currently if using sling-mock 1.4 with a dependencyManagement setting the
> version of jcr.resource to 2.5 the following error can be observed while
> executing tests
> {code}
> org.apache.sling.testing.mock.osgi.ReferenceViolationException: Unable to
> inject mandatory reference 'pathMapper' for class
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrResourceProviderFactory
> : no matching services were found.
> at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.injectServiceReference(OsgiServiceUtil.java:313)
> at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.injectServices(OsgiServiceUtil.java:289)
> at
> org.apache.sling.testing.mock.osgi.MockOsgi.injectServices(MockOsgi.java:118)
> at
> org.apache.sling.testing.mock.sling.MockJcrResourceResolverFactory.getResourceResolverInternal(MockJcrResourceResolverFactory.java:66)
> at
> org.apache.sling.testing.mock.sling.AbstractMockResourceResolverFactory.getAdministrativeResourceResolver(AbstractMockResourceResolverFactory.java:106)
> at
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.resourceResolver(SlingContextImpl.java:179)
> at
> org.apache.sling.testing.mock.sling.context.SlingContextImpl.load(SlingContextImpl.java:237)
> .....
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)