question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How to run the library externally?

See original GitHub issue

Good afternoon,

I am doing a POC about the library running in this way:

java -cp ./target/spring-boot-chaos-poc-0.1.0-SNAPSHOT.jar \
-Dloader.path=chaos-monkey-spring-boot-2.0.0.jar \
org.springframework.boot.loader.PropertiesLauncher \
--spring.profiles.active=chaos-monkey

and if the property: chaos.monkey.watcher.controller: true appear in the configuration, the execution fails.

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2018-09-04 13:49:33.839 ERROR 70696 --- [           main] o.s.boot.SpringApplication               : Application run failed

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controllerAspect' defined in class path resource [de/codecentric/spri
ng/boot/chaos/monkey/configuration/ChaosMonkeyConfiguration.class]: Post-processing of merged bean definition failed; nested exception is java.lang.IllegalSt
ateException: Failed to introspect Class [de.codecentric.spring.boot.chaos.monkey.watcher.SpringControllerAspect] from ClassLoader [org.springframework.boot.
loader.LaunchedURLClassLoader@17dca04]

...
...

Caused by: java.lang.NoClassDefFoundError: org/aspectj/lang/ProceedingJoinPoint
        at java.lang.Class.getDeclaredMethods0(Native Method) ~[na:1.8.0_181]
        at java.lang.Class.privateGetDeclaredMethods(Unknown Source) ~[na:1.8.0_181]
        at java.lang.Class.getDeclaredMethods(Unknown Source) ~[na:1.8.0_181]
        at org.springframework.util.ReflectionUtils.getDeclaredMethods(ReflectionUtils.java:641) ~[spring-core-5.0.8.RELEASE.jar!/:5.0.8.RELEASE]
        ... 30 common frames omitted
Caused by: java.lang.ClassNotFoundException: org.aspectj.lang.ProceedingJoinPoint
        at java.net.URLClassLoader.findClass(Unknown Source) ~[na:1.8.0_181]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_181]
        at org.springframework.boot.loader.LaunchedURLClassLoader.loadClass(LaunchedURLClassLoader.java:93) ~[spring-boot-chaos-poc-0.1.0-SNAPSHOT.jar:0.1.0-
SNAPSHOT]
        at java.lang.ClassLoader.loadClass(Unknown Source) ~[na:1.8.0_181]


You can test it in the POC. I have isolated the scenario in this branch: https://github.com/jabrena/spring-boot-chaos-poc/tree/feature/codecentric

How to run the example:

./runChaos.sh

Many thanks in advance

Juan Antonio

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:42 (17 by maintainers)

github_iconTop GitHub Comments

3reactions
jabrenacommented, Oct 14, 2018

Hi @MrBW,

yes, the bug was fixed and thank you, the library is pretty useful. Please, release the new jar to upgrade the POC with final jar.

Cheers

Juan Antonio

2reactions
MrBWcommented, Oct 10, 2018

I fixed it, I realy fixed it! 😃

Please take a look at: https://github.com/codecentric/chaos-monkey-spring-boot/tree/master/demo-apps/chaos-monkey-demo-app-ext-jar

Just mvn clean package and run runChaos.sh

I have switched from compile-time to load-time weaving.

Test it and share your results, please.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Using external libraries - Creative Coding - Allison Parrish
In this tutorial, I'll show you how to locate, download and integrate third-party p5.js-compatible libraries.
Read more >
How to run your Steam library from an external drive
If you game on multiple different PCs at once, then running your Steam library from an external drive could be just what you...
Read more >
Using external libraries in Java | Opensource.com
Gain access to the code specific to the database software being used. Connect to the database server. Build a query string. Execute the...
Read more >
How to run Java program in terminal with external library JAR
You can do : 1) javac -cp /path/to/jar/file Myprogram.java. 2) java -cp .:/path/to/jar/file Myprogram. So, lets suppose your current working ...
Read more >
How To Move FCPX Library To External Drive - YouTube
Hey there. If you're asking yourself “How To Move FCPX Library To External Drive” you're in the right place. It's easy and I'll...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found