Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Springboot app startup failed when chaos-monkey-spring-boot is binded to the application using external dependency jar file. #446

Open
heyitspulkit opened this issue Mar 7, 2024 · 2 comments

Comments

@heyitspulkit
Copy link

Our application is running on the latest spring boot versions and we are trying to integrate chaos-monkey-spring-boot with the application using external dependency jar file, the application is failing to start.

Spring boot version in the application - 3.2.2
Chaos jar version - chaos-monkey-spring-boot-3.1.0-jar-with-dependencies.jar

Is it some known version incompatibility issue as mentioned (https://codecentric.github.io/chaos-monkey-spring-boot/latest/#:~:text=Chaos%20Monkey%20might%20break) or a bug?

Kindly assist.

@WtfJoke
Copy link
Contributor

WtfJoke commented Mar 15, 2024

Thank you for raising the issue.
Can you please provide a stacktrace or even better a small reproducer?

@heyitspulkit
Copy link
Author

chaos-test.zip

Attached the sample project.
Startup Command:
java -Dspring.profiles.active=chaos-monkey -cp target/chaos-test-0.0.1-SNAPSHOT.jar -Dloader.path=src/main/resources/chaos/chaos-monkey-spring-boot-jar-with-dependencies.jar org.springframework.boot.loader.launch.PropertiesLauncher

Error Stack:


/ ____| |                     |  \/  |           | |

| | | |__ __ _ ___ ___ | \ / | ___ _ __ | | _____ _ _
| | | '_ \ / ` |/ _ / _| | |/| |/ _ | ' | |/ / _ | | | |
| |
| | | | (| | () _ \ | | | | () | | | | | __| || |
_|| ||_,|_/|/ || ||___/|| |||____|__, |
/ |
ready to do evil! |
/

:: Chaos Monkey for Spring Boot ::

2024-03-18T13:20:14.961+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'de.codecentric.spring.boot.chaos.monkey.configuration.ChaosMonkeyConfiguration' of type [de.codecentric.spring.boot.chaos.monkey.configuration.ChaosMonkeyConfiguration] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.966+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'chaosMonkeySettings' of type [de.codecentric.spring.boot.chaos.monkey.configuration.ChaosMonkeySettings] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.967+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'chaosMonkeyMetricsPublisher' of type [de.codecentric.spring.boot.chaos.monkey.component.MetricEventPublisher] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.969+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'latencyAssault' of type [de.codecentric.spring.boot.chaos.monkey.assaults.LatencyAssault] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.971+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'exceptionAssault' of type [de.codecentric.spring.boot.chaos.monkey.assaults.ExceptionAssault] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.973+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'killAppAssault' of type [de.codecentric.spring.boot.chaos.monkey.assaults.KillAppAssault] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.977+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'memoryAssault' of type [de.codecentric.spring.boot.chaos.monkey.assaults.MemoryAssault] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.990+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'cpuAssault' of type [de.codecentric.spring.boot.chaos.monkey.assaults.CpuAssault] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.991+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'chaosToggles' of type [de.codecentric.spring.boot.chaos.monkey.configuration.toggles.DefaultChaosToggles] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.994+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'chaosToggleNameMapper' of type [de.codecentric.spring.boot.chaos.monkey.configuration.toggles.DefaultChaosToggleNameMapper] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:14.999+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'chaosMonkeyRequestScope' of type [de.codecentric.spring.boot.chaos.monkey.component.ChaosMonkeyRequestScope] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyBeanPostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:15.086+11:00 WARN 25456 --- [ main] trationDelegate$BeanPostProcessorChecker : Bean 'chaosMonkeyBaseClassFilter' of type [de.codecentric.spring.boot.chaos.monkey.watcher.advice.filter.ChaosMonkeyBaseClassFilter] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying). Is this bean getting eagerly injected into a currently created BeanPostProcessor [chaosMonkeyRestTemplatePostProcessor]? Check the corresponding BeanPostProcessor declaration and its dependencies.
2024-03-18T13:20:15.159+11:00 WARN 25456 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chaosMonkeyRestTemplatePostProcessor' defined in class path resource [de/codecentric/spring/boot/chaos/monkey/configuration/ChaosMonkeyRestTemplateConfiguration.class]: BeanPostProcessor before instantiation of bean failed
2024-03-18T13:20:15.168+11:00 INFO 25456 --- [ main] .s.b.a.l.ConditionEvaluationReportLogger :

Error starting ApplicationContext. To display the condition evaluation report re-run your application with 'debug' enabled.
2024-03-18T13:20:15.187+11:00 ERROR 25456 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

org.springframework.aop.support.AopUtils.getMostSpecificMethod(AopUtils.java:206)

The following method did not exist:

'java.lang.reflect.Method org.springframework.core.BridgeMethodResolver.getMostSpecificMethod(java.lang.reflect.Method, java.lang.Class)'

The calling method's class, org.springframework.aop.support.AopUtils, was loaded from the following location:

jar:nested:/C:/Users/chaos-test/target/chaos-test-0.0.1-SNAPSHOT.jar/!BOOT-INF/lib/spring-aop-6.1.3.jar!/org/springframework/aop/support/AopUtils.class

The called method's class, org.springframework.core.BridgeMethodResolver, is available from the following locations:

jar:file:/C:/Users/chaos-test/src/main/resources/chaos/chaos-monkey-spring-boot-jar-with-dependencies.jar!/org/springframework/core/BridgeMethodResolver.class
jar:nested:/C:/Users/chaos-test/target/chaos-test-0.0.1-SNAPSHOT.jar/!BOOT-INF/lib/spring-core-6.1.3.jar!/org/springframework/core/BridgeMethodResolver.class

The called method's class hierarchy was loaded from the following locations:

org.springframework.core.BridgeMethodResolver: file:/C:/Users/chaos-test/src/main/resources/chaos/chaos-monkey-spring-boot-jar-with-dependencies.jar

Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.springframework.aop.support.AopUtils and org.springframework.core.BridgeMethodResolver

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants