Error causing program to not launch after scanning plugins
Initially, scanning Amplitube 5 caused it to crash but It would still start afterwards. Then I noticed that when I tried to uninstall any plug-in, I would get an error. Finally, while scanning my plug-ins, Owl Plug still crashed after removing Amplitube 5 myself, what I thought was the problem plugin, and now I get an error that causes it to not start at all, the error windows read "Error during application context initialization" then "Failed to launch JVM"
Hello @pyl3 !
Thank you for reporting the issue. Can you share the logs in owlplug.log file ? It would help me to identify the root cause.
Windows directory
C:/Users/{you}/.owlplug/logs
Linux / MacOs directory
/home/{you}/.owlplug/logs
The application state might be corrupted. After logs extraction, you can try to reset the data by deleting following files:
- On Windows
C:/Users/{you}/.owlplug/owlplug.db(if present)C:/Users/{you}/.owlplug/owlplug.mv.db(if present)
- On Linux / MacOS
/home/{you}/.owlplug/owlplug.db(if present)/home/{you}/.owlplug/owlplug.mv.db(if present)
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:258)
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:331)
at com.owlplug.OwlPlug$$SpringCGLIB$$0.getCacheManager(<generated>)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(Unknown Source)
at java.base/java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:139)
... 49 common frames omitted
Caused by: java.lang.RuntimeException: Persistence directory already locked by another process: C:\Users\pyl3.owlplug\cache
at org.ehcache.impl.persistence.DefaultLocalPersistenceService.internalStart(DefaultLocalPersistenceService.java:105)
at org.ehcache.impl.persistence.DefaultLocalPersistenceService.start(DefaultLocalPersistenceService.java:75)
at org.ehcache.core.spi.ServiceLocator.startAllServices(ServiceLocator.java:128)
at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:582)
... 58 common frames omitted
1667 INFO c.o.c.c.ApplicationDefaults - Runtime Platform Resolved: RuntimePlatform [tag=win64, operatingSystem=WIN, arch=64]
4883 ERROR com.owlplug.OwlPlug - Error during application context initialization
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'optionsService': Unsatisfied dependency expressed through field 'imageCache': Error creating bean with name 'imageCache': Unsatisfied dependency expressed through field 'cacheManager': Error creating bean with name 'getCacheManager' defined in com.owlplug.OwlPlug: Failed to instantiate [org.ehcache.CacheManager]: Factory method 'getCacheManager' threw exception with message: Persistence directory already locked by another process: C:\Users\pyl3.owlplug\cache
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:716)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:696)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:483)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1416)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:973)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:942)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:608)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:734)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:436)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312)
at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:150)
at com.owlplug.OwlPlug.init(OwlPlug.java:76)
at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:817)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$2(LauncherImpl.java:196)
at java.base/java.lang.Thread.run(Unknown Source)
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'imageCache': Unsatisfied dependency expressed through field 'cacheManager': Error creating bean with name 'getCacheManager' defined in com.owlplug.OwlPlug: Failed to instantiate [org.ehcache.CacheManager]: Factory method 'getCacheManager' threw exception with message: Persistence directory already locked by another process: C:\Users\pyl3.owlplug\cache
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:716)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:696)
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:145)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:483)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1416)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:597)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:713)
... 21 common frames omitted
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getCacheManager' defined in com.owlplug.OwlPlug: Failed to instantiate [org.ehcache.CacheManager]: Factory method 'getCacheManager' threw exception with message: Persistence directory already locked by another process: C:\Users\pyl3.owlplug\cache
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:659)
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:493)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1332)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1162)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:560)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:520)
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:326)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:324)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:254)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1417)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1337)
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.resolveFieldValue(AutowiredAnnotationBeanPostProcessor.java:713)
... 35 common frames omitted
Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.ehcache.CacheManager]: Factory method 'getCacheManager' threw exception with message: Persistence directory already locked by another process: C:\Users\pyl3.owlplug\cache
at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:171)
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:655)
... 48 common frames omitted
Caused by: org.ehcache.StateTransitionException: Persistence directory already locked by another process: C:\Users\pyl3.owlplug\cache
at org.ehcache.core.StatusTransitioner$Transition.failed(StatusTransitioner.java:230)
at org.ehcache.core.EhcacheManager.init(EhcacheManager.java:610)
at com.owlplug.OwlPlug.getCacheManager(OwlPlug.java:158)
at com.owlplug.OwlPlug$$SpringCGLIB$$0.CGLIB$getCacheManager$3(
Thanks for the logs ! It looks like owlplug is trying to use C:\Users\pyl3.owlplug\cache intead of C:\Users\pyl3\.owlplug\cache.
I was not able to reproduce the issue on a Windows 10 host, but i've noticed some weird path management in the code, so i've cleaned up things in 442a958.
I'll publish a new OwlPlug version really soon, i hope it will fix this issue 😉
@pyl3 Can you reproduce with the latest OwlPlug 1.29.0 ? https://github.com/DropSnorz/OwlPlug/releases/tag/1.29.0