Unable to initialize JCR_MOCK resource resolver factory in Cloud Pipeline
Hi Guys,
I am getting below error while doing cloud migration, in my unit test cases
20:07:17,294 [ThreadedStreamConsumer] [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 1.394 s <<< FAILURE! - in com.abcd.core.services.LocaliseLinksActionFactoryTest
20:07:17,341 [ThreadedStreamConsumer] [ERROR] com.abcd.core.services.LocaliseLinksActionFactoryTest Time elapsed: 1.392 s <<< ERROR!
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/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
below is my maven compiler plugin dependency and other important dependencies.
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<org.apache.sling.testing.sling-mock.version>3.4.10</org.apache.sling.testing.sling-mock.version>