Hi Geeks,
Getting below error for a Junit in cloud pipeline. Local build is working fine.
Please advice
Unable to initialize JCR_MOCK resource resolver factory: Unable to invoke method 'activate' for class org.apache.sling.testing.mock.sling.MockJcrSlingRepository
Caused by: java.lang.RuntimeException: Unable to invoke method 'activate' for class org.apache.sling.testing.mock.sling.MockJcrSlingRepository
Caused by: java.lang.UnsupportedClassVersionError: org/apache/jackrabbit/api/observation/JackrabbitObservationManager has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
java.lang.RuntimeException: Unable to initialize JCR_MOCK resource resolver factory: Unable to invoke method 'activate' for class org.apache.sling.testing.mock.sling.MockJcrSlingRepository
Caused by: java.lang.RuntimeException: Unable to invoke method 'activate' for class org.apache.sling.testing.mock.sling.MockJcrSlingRepository
Caused by: java.lang.UnsupportedClassVersionError: org/apache/sling/testing/mock/jcr/MockObservationManager
below is my project POM dependency
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @vishnu_reddy31 ,
What is JAVA version you are using, please upgrade java to 11 locally and then try to build.
Most probably you will have to upgrade few more dependencies which are not compatible .
Once this is done locally upgrade java version to cloud as well.
Thanks
Tarun
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies