Closed royteeuwen closed 3 weeks ago
this looks like a mismatch of johnzon version and the ongoing switch from javax.json to jakarta.json. also this switch is done for most/lot of sling modules, that's not the case for some of the adobe modules, esp. the adobe core components. within OSGi this is not a problem as each bundle consumes the correct version, but inside the testing classpath this can get to a conflict.
in https://github.com/wcm-io/io.wcm.maven.aem-cloud-dependencies/pull/52 i tried to switch everything to jakarta.json for the testing classpath, but it did not work with adobe core components, so i reverted that in https://github.com/wcm-io/io.wcm.maven.aem-cloud-dependencies/pull/53.
please make sure that all versions of these dependencies in your test classpath use the versions as defined in the aem-cloud-dependencies
POM you are using, and not overwritten with a different version:
org.apache.johnzon:johnzon-core
org.apache.geronimo.specs:geronimo-json_1.1_spec
it does work when code relies on jakarta.json because since some releases sling-mock comes with dependencies akarta.json:jakarta.json-api
and org.glassfish:jakarta.json
to support those modules that rely on jakarta.json. but it does not work for modules actually relying on the johnzon API, because the johnzon API stays the same between 1.x and 2.x version, but switches the json implementation internally.`
When upgrading to the latest dependencies, I get following exception. Did this occur for you and did you do anything to fix it? I upgraded all other maven dependencies to the latest versions, but it doesn't seem to fix the problem: