chaos-monkey v3.1.0 code compilation failed when compiling code with Java 11

24 Views Asked by At

I am working on POC to do chaos experiment for target Spring Boot application. Purpose to make this POC is such a way one can do chaos experiment on any Spring Boot application without making changes single line of code change in target spring-boot application.

I referred https://codecentric.github.io/chaos-monkey-spring-boot/latest/#_using_external_dependency_jar_file for the same.

I tried to use https://github.com/codecentric/chaos-monkey-spring-boot/releases/tag/v3.1.0 external library but my application is running on Java 11 whereas the external chaos-monkey lib is compiled with Java 17.

I checkout v3.1.0 source code tried to compiled with Java 11, but it failed. I need help to compile the code with Java 11.

Chaos-monkey v3.1.0 successfully compiled with Java 17, but for the java applications which are running using lower version (Java 8 or Java 11), it failed to compile and giving below error.

mvn clean install using JDK 11

Output:

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project chaos-monkey-spring-boot: Compilation failure: Compilation failure:
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/component/ChaosMonkeyRequestScope.java:[120,72] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/component/ChaosMonkeyRequestScope.java:[122,9] illegal start of expression
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/component/ChaosMonkeyRequestScope.java:[124,38] <identifier> expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/component/ChaosMonkeyRequestScope.java:[138,1] class, interface, or enum expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[137,86] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[139,32] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[139,50] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[139,59] not a statement
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[139,87] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[144,66] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[146,32] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[146,50] ';' expected
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[146,59] not a statement
[ERROR] /C:/Users/Pratik/Documents/work/external_git_work_data/chaos-monkey-spring-boot/chaos-monkey-spring-boot/src/main/java/de/codecentric/spring/boot/chaos/monkey/configuration/AssaultException.java:[146,87] ';' expected
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
0

There are 0 best solutions below