On Tuesday 16 January 2018 18:22:41 Christian Schneider wrote:
> I am trying the test some code that works on the sling repository.

Hi Christian,

> I have problems getting the pax exam test working. I get the exception
> below:
> 
> java.lang.AbstractMethodError:
> org.apache.jackrabbit.core.XASessionImpl.getItemOrNull(Ljava/lang/String;)Lj
> avax/jcr/Item; at
> org.apache.sling.jcr.resource.internal.helper.jcr.JcrItemResourceFactory.ge
> tItemOrNull(JcrItemResourceFactory.java:184)
> 
> Full exception:
> https://gist.github.com/cschneider/d01d087244dc0650b3751e99a70b6a72
> 
> This might be some incompatibility between the jackrabbit core bundle and
> the sling bundles.
> I use:
> oak 1.7.6
> jackrabbit 2.15.4

don't use odd (minor) versions (even not in tests). Those are cut from 
unstable branches.

> mavenBundle("org.apache.sling", "org.apache.sling.jcr.resource", "2.9.2"),
> 
> mavenBundle("org.apache.sling", "org.apache.sling.resourceresolver",
> "1.5.22"),
> 
> mavenBundle("org.apache.sling", "org.apache.sling.serviceusermapper",
> "1.2.4"),
> 
> Any idea what is wrong with my setup and which versions I should combine to
> avoid this issue?

You can try with Sling's Pax Exam support (Sling Testing PaxExam):
http://sling.apache.org/documentation/development/testing-paxexam.html

At least look at Sling's Karaf Features[1] or Testing PaxExam's 
VersionResolver[2] to see which versions play together (backed by lots of 
ITs).

Regards,
O.

[1] 
https://github.com/apache/sling-org-apache-sling-karaf-features/blob/master/src/main/feature/feature.xml

[2] 
https://github.com/apache/sling-org-apache-sling-testing-paxexam/blob/master/src/main/java/org/apache/sling/testing/paxexam/SlingVersionResolver.java

> Christian

Reply via email to