AEM Cloud dependencies upgrade

2 views
Skip to first unread message

Basic Danijel

unread,
Apr 4, 2024, 9:02:24 AM4/4/24
to wcm-i...@googlegroups.com
Hi everybody,

I'm trying to upgrade the version of 'io.wcm.maven:io.wcm.maven.aem-cloud-dependencies' on a project: from '2023.9.13665.20230927T063259Z-230800.0000' to the latest one '2024.3.15575.20240318T214814Z-231200.0000'.

During the project build, there's a lot of failed JUnit tests and the stacktrace looks like the one below for most of them.

It might be that some dependency is missing and/or the current dependency versions used in the project have to be updated.

Could you please give me some advice?

Best regards,
Danijel

The stacktrace:

java.lang.RuntimeException: Unable to invoke method 'activate' for class org.apache.sling.xss.impl.XSSAPIImpl
at org.apache.sling.testing.mock.osgi.OsgiServiceUtil.invokeMethod(OsgiServiceUtil.java:366)
...
Caused by: jakarta.json.JsonException: Provider org.glassfish.json.JsonProviderImpl not found
at jakarta.json.spi.JsonProvider.provider(JsonProvider.java:75)
...
Caused by: java.lang.ClassNotFoundException: org.glassfish.json.JsonProviderImpl
at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)

java.lang.RuntimeException: Unable to initialize JCR_OAK resource resolver factory: Unable to get ResourceResolverFactory.

at io.wcm.testing.mock.aem.context.ContextResourceResolverFactory.get(ContextResourceResolverFactory.java:83)
...
Caused by: java.lang.IllegalStateException: Unable to get ResourceResolverFactory.
at org.apache.sling.testing.mock.sling.ResourceResolverFactoryInitializer.setUp(ResourceResolverFactoryInitializer.java:85)


Stefan Seifert

unread,
Apr 8, 2024, 7:31:01 AM4/8/24
to wcm-i...@googlegroups.com
hello daniel.

did you try to update all testing dependencies in your project as well, esp. the dependency to aem-mock?
there is a gradual change ongoing from javax.json to jakarta.json with the related maven dependencies, and the latest aem-mock/sling-mock etc. dependencies should be updated accordingly.

stefan
Reply all
Reply to author
Forward
0 new messages