[ 
https://issues.apache.org/jira/browse/SLING-13142?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18069972#comment-18069972
 ] 

Robert Rathsack commented on SLING-13142:
-----------------------------------------

Thanks a lot for checking! We are indeed using the library with AEM, and our 
aem sdk update from {{2025.10.22943.20251009T135918Z-251000}} to 
{{2026.2.24678.20260226T154829Z-260200}} also updated oak-jcr from 1.86.0 to 
1.90.0 - and afterwards we got the error from the description above in our 
tests.

I also updated {{io.wcm:io.wcm.testing.aem-mock.junit5 }}to {{5.7.2}} and 
{{org.apache.sling:org.apache.sling.testing.sling-mock.junit5}} to 
{{{}3.6.0{}}}, but the error is still present.

When debugging the issue, I can see that in 
{{org.apache.jackrabbit.oak.spi.whiteboard.DefaultWhiteboard}} from the aen-sdk 
the error is happening in {{{}register(Class<T> type, T service, Map<?, ?> 
properties){}}}. It wants to register something with type 
{{{}org.apache.jackrabbit.oak.api.jmx.NodeCounterMBean{}}}, but the actual 
value type is 
{{{}org.apache.jackrabbit.oak.plugins.index.counter.jmx.NodeCounter{}}}. Do you 
have an idea what might be wrong?

Or the other way round, what do I need to do to build the lib for 1.90 on my 
machine in order to verify that the issue is not related to the version update?

> 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)

Reply via email to