Description
When using Oak with pojosr support in Spring Boot based application then following exception is seen
Caused by: java.lang.RuntimeException: java.lang.StringIndexOutOfBoundsException: String index out of range: -4 at org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.startBundles(OakOSGiRepositoryFactory.java:341) at org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.initializeServiceRegistry(OakOSGiRepositoryFactory.java:217) at org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.getRepository(OakOSGiRepositoryFactory.java:161) at com.meta64.mobile.repo.OakRepository.createRepository(OakRepository.java:258) at com.meta64.mobile.repo.OakRepository.initRepository(OakRepository.java:226) at com.meta64.mobile.repo.OakRepository.postConstruct(OakRepository.java:158) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:349) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:300) at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133) ... 51 more Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -4 at java.lang.String.substring(String.java:1875) at org.apache.felix.connect.PojoSR.buildRevision(PojoSR.java:334) at org.apache.felix.connect.PojoSR.startBundles(PojoSR.java:259) at org.apache.jackrabbit.oak.run.osgi.OakOSGiRepositoryFactory.startBundles(OakOSGiRepositoryFactory.java:339) ... 63 more
Application used here a modified form of https://github.com/Clay-Ferguson/meta64