[ 
https://issues.apache.org/jira/browse/SLING-10265?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

subramanya updated SLING-10265:
-------------------------------
    Description: 
I am unable to run test cases using JUNIT5 with JCR_OAK repository 
implementation in the test case code .

Repository using JCR_MOCK works, the snippet below works

private final AemContext aemContext = new 
AemContext(ResourceResolverType.JCR_MOCK);   

Where as this one throws exception:

private final AemContext aemContext = new 
AemContext(ResourceResolverType.JCR_OAK);   

This is the error I am getting 

java.lang.RuntimeException: Unable to initialize JCR_OAK resource resolver 
factory: Unable to invoke method 'activate' for class 
org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository Caused by: 
java.lang.NoSuchMethodError: 
org.apache.jackrabbit.oak.plugins.nodetype.constraint.Constraints.asPredicate(ILjava/lang/String;)Ljava/util/function/Predicate;
  summary JUNIT5 Test cases are failing when I use new 
AemContext(ResourceResolverType.JCR_OAK)

  was:I am unable to run test cases using JUNIT5 with JCR_OAK repository 
implementation in the test case code . Repository using JCR_MOCK works, the 
snippet below works private final AemContext aemContext = new 
AemContext(ResourceResolverType.JCR_MOCK);   Where as this one throws 
exception: private final AemContext aemContext = new 
AemContext(ResourceResolverType.JCR_OAK);   This is the error I am getting  
java.lang.RuntimeException: Unable to initialize JCR_OAK resource resolver 
factory: Unable to invoke method 'activate' for class 
org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository Caused by: 
java.lang.NoSuchMethodError: 
org.apache.jackrabbit.oak.plugins.nodetype.constraint.Constraints.asPredicate(ILjava/lang/String;)Ljava/util/function/Predicate;
  summary JUNIT5 Test cases are failing when I use new 
AemContext(ResourceResolverType.JCR_OAK)


> JUNIT5 Test cases are failing when I use code "new 
> AemContext(ResourceResolverType.JCR_OAK)"
> --------------------------------------------------------------------------------------------
>
>                 Key: SLING-10265
>                 URL: https://issues.apache.org/jira/browse/SLING-10265
>             Project: Sling
>          Issue Type: Bug
>          Components: Apache Sling Testing Clients
>    Affects Versions: Testing Sling Mock 2.6.0
>            Reporter: subramanya
>            Priority: Blocker
>
> I am unable to run test cases using JUNIT5 with JCR_OAK repository 
> implementation in the test case code .
> Repository using JCR_MOCK works, the snippet below works
> private final AemContext aemContext = new 
> AemContext(ResourceResolverType.JCR_MOCK);   
> Where as this one throws exception:
> private final AemContext aemContext = new 
> AemContext(ResourceResolverType.JCR_OAK);   
> This is the error I am getting 
> java.lang.RuntimeException: Unable to initialize JCR_OAK resource resolver 
> factory: Unable to invoke method 'activate' for class 
> org.apache.sling.testing.mock.sling.oak.OakMockSlingRepository Caused by: 
> java.lang.NoSuchMethodError: 
> org.apache.jackrabbit.oak.plugins.nodetype.constraint.Constraints.asPredicate(ILjava/lang/String;)Ljava/util/function/Predicate;
>   summary JUNIT5 Test cases are failing when I use new 
> AemContext(ResourceResolverType.JCR_OAK)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to