0

INFO | jvm 1 | 2022/01/12 18:02:50 | Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. INFO | jvm 1 | 2022/01/12 18:02:50 | 18:02:50.298 [WrapperJarAppMain] WARN o.s.boot.SpringApplication - Error handling failed (org.springframework.boot.web.servlet.context.AnnotationConfigServletWebServerApplicationContext@1cc5b95 has not been refreshed yet) INFO | jvm 1 | 2022/01/12 18:02:50 | 18:02:50.483 [WrapperJarAppMain] ERROR o.s.boot.SpringApplication - Application run failed INFO | jvm 1 | 2022/01/12 18:02:50 | org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'mongoMetricsConnectionPoolListener' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/mongo/MongoMetricsAutoConfiguration$MongoConnectionPoolMetricsConfiguration.class]: Unsatisfied dependency expressed through method 'mongoMetricsConnectionPoolListener' parameter 1; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoConnectionPoolTagsProvider' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/mongo/MongoMetricsAutoConfiguration$MongoConnectionPoolMetricsConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [io.micrometer.core.instrument.binder.mongodb.DefaultMongoConnectionPoolTagsProvider] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@67502fc5] INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:944) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:754) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:434) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:338) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1343) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.SpringApplication.run(SpringApplication.java:1332) INFO | jvm 1 | 2022/01/12 18:02:50 | at com.ebay.soa.raptorio.app.web.buyingsvc.BuyingsvcApplication.main(BuyingsvcApplication.java:10) INFO | jvm 1 | 2022/01/12 18:02:50 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2022/01/12 18:02:50 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) INFO | jvm 1 | 2022/01/12 18:02:50 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.reflect.Method.invoke(Method.java:498) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) INFO | jvm 1 | 2022/01/12 18:02:50 | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2022/01/12 18:02:50 | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) INFO | jvm 1 | 2022/01/12 18:02:50 | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.reflect.Method.invoke(Method.java:498) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.tanukisoftware.wrapper.WrapperJarApp.run(WrapperJarApp.java:352) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.Thread.run(Thread.java:748) INFO | jvm 1 | 2022/01/12 18:02:50 | Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mongoConnectionPoolTagsProvider' defined in class path resource [org/springframework/boot/actuate/autoconfigure/metrics/mongo/MongoMetricsAutoConfiguration$MongoConnectionPoolMetricsConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalStateException: Failed to introspect Class [io.micrometer.core.instrument.binder.mongodb.DefaultMongoConnectionPoolTagsProvider] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@67502fc5] INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:597) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1380) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1300) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) INFO | jvm 1 | 2022/01/12 18:02:50 | ... 33 common frames omitted INFO | jvm 1 | 2022/01/12 18:02:50 | Caused by: java.lang.IllegalStateException: Failed to introspect Class [io.micrometer.core.instrument.binder.mongodb.DefaultMongoConnectionPoolTagsProvider] from ClassLoader [org.springframework.boot.loader.LaunchedURLClassLoader@67502fc5] INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:481) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.util.ReflectionUtils.doWithLocalMethods(ReflectionUtils.java:321) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.buildLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:232) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.findLifecycleMetadata(InitDestroyAnnotationBeanPostProcessor.java:210) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(InitDestroyAnnotationBeanPostProcessor.java:149) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.context.annotation.CommonAnnotationBeanPostProcessor.postProcessMergedBeanDefinition(CommonAnnotationBeanPostProcessor.java:305) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyMergedBeanDefinitionPostProcessors(AbstractAutowireCapableBeanFactory.java:1116) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:594) INFO | jvm 1 | 2022/01/12 18:02:50 | ... 43 common frames omitted INFO | jvm 1 | 2022/01/12 18:02:50 | Caused by: java.lang.NoClassDefFoundError: com/mongodb/event/ConnectionPoolCreatedEvent INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.Class.getDeclaredMethods0(Native Method) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.Class.getDeclaredMethods(Class.java:1975) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:463) INFO | jvm 1 | 2022/01/12 18:02:50 | ... 50 common frames omitted INFO | jvm 1 | 2022/01/12 18:02:50 | Caused by: java.lang.ClassNotFoundException: com.mongodb.event.ConnectionPoolCreatedEvent INFO | jvm 1 | 2022/01/12 18:02:50 | at java.net.URLClassLoader.findClass(URLClassLoader.java:382) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.ClassLoader.loadClass(ClassLoader.java:419) INFO | jvm 1 | 2022/01/12 18:02:50 | at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:89) INFO | jvm 1 | 2022/01/12 18:02:50 | at java.lang.ClassLoader.loadClass(ClassLoader.java:352) INFO | jvm 1 | 2022/01/12 18:02:50 | ... 54 common frames omitted INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: Encountered an error running main: INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: java.lang.reflect.InvocationTargetException INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at java.lang.reflect.Method.invoke(Method.java:498) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:58) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at java.lang.reflect.Method.invoke(Method.java:498) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at org.tanukisoftware.wrapper.WrapperJarApp.run(WrapperJarApp.java:352) INFO | jvm 1 | 2022/01/12 18:02:50 | WrapperJarApp: at java.lang.Thread.run(Thread.java:748)

  • Please trim your code to make it easier to find your problem. Follow these guidelines to create a [minimal reproducible example](https://stackoverflow.com/help/minimal-reproducible-example). – Community Jan 21 '22 at 11:05

1 Answers1

1

Wondering if you found a solution. I am facing this as well after upgrading to spring boot parent version 2.6.2 to get the latest mongo driver.

Update: Actually I found a solution myself

Added the following to my app properties.. Sourced link also below. management.metrics.mongo.command.enabled=false management.metrics.mongo.connectionpool.enabled=false

https://docs.spring.io/spring-boot/docs/2.5.0/reference/html/actuator.html#actuator.metrics.supported.mongodb

I31
  • 57
  • 1
  • 1
  • 11
  • this is rather a question than an answer – nermineslimane Jan 21 '22 at 16:56
  • I'm obviously aware it was a question but sometimes people can find the solution themselves and not update these.. There is no other way to question it. Anyways, I've since updated with my own solution.. Hope this makes you happy. – I31 Jan 21 '22 at 17:13