[
https://issues.apache.org/jira/browse/SLING-13142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18070537#comment-18070537
]
Robert Rathsack commented on SLING-13142:
-----------------------------------------
I wasn't aware of the {{io.wcm.maven.aem-cloud-dependencies}} project. We
developed a small script which unzips the aem jar, reads the versions and
exports them as xml properties to ensure that we are always in sync with the
provided versions.
But the hint at the end of the page about putting AEM Mocks before the AEM SDK
API dependencies solved our OakMockSlingRepository problem. We now have some
OakConstraint exceptions, but since not all tests seems to be affected, it
seems something in our tests needs to be updated. As
sling.testing.sling-mock-oak seems to be compatible with the latest oak-jcr
versions, I will try to close this ticket as not a bug.
> Latest sling.testing.sling-mock-oak not compatible with jackrabbit oak-jcr
> 1.90 & 1.92
> --------------------------------------------------------------------------------------
>
> Key: SLING-13142
> URL: https://issues.apache.org/jira/browse/SLING-13142
> Project: Sling
> Issue Type: Bug
> Components: Testing
> Affects Versions: Testing Sling Mock Oak 4.1.0-1.86.0
> Reporter: Robert Rathsack
> Priority: Major
>
> Our Prod environment was updated to use jackrabbit.oak-jcr 1.90.0 (and they
> are preparing to update to 1.92). In our dependency settings we could not
> update this provided dependency to this version because our tests would fail
> with such errors:
>
> {{java.lang.RuntimeException: Unable to invoke method 'activate' for class
> org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository}}
> {{ at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:379)}}
> {{ at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.lambda$invokeLifecycleMethod$0(OsgiServiceUtil.java:188)}}
> {{ at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.findAndInvokeNearestMethod(OsgiServiceUtil.java:141)}}
> {{ at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeLifecycleMethod(OsgiServiceUtil.java:177)}}
> {{ at
> org.apache.sling.testing.mock.osgi.OsgiServiceUtil.activateDeactivate(OsgiServiceUtil.java:88)}}
> {{ at
> org.apache.sling.testing.mock.osgi.MockOsgi.registerInjectActivateService(MockOsgi.java:254)}}
> {{ at
> org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.registerServiceIfNotPresent(ResourceResolverFactoryInitializer.java:235)}}
> {{ at
> org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.registerServiceIfNotPresent(ResourceResolverFactoryInitializer.java:218)}}
>
> In the past, those errors were every time related to a missing update of the
> Sling Mock Oak lib. Therefore, please create a release to support oak-jcr
> 1.90 and 1.92
--
This message was sent by Atlassian Jira
(v8.20.10#820010)