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.

Failsafe is mandatory dependency since RC.6

See original GitHub issue

Description

Seems we got again the problem with optionality of dependency. Build where only auto starter is included fails with NoClassDefFoundError

Expected Behavior

Default spring starter project with riptide-spring-boot-starter should pass the ContextLoad test

Actual Behavior

Test fails with

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.zalando.riptide.autoconfigure.RiptidePostProcessor]: Factory method 'riptidePostProcessor' threw exception; nested exception is java.lang.NoClassDefFoundError: net/jodah/failsafe/Policy
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:185)
	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:622)
	... 42 more
Caused by: java.lang.NoClassDefFoundError: net/jodah/failsafe/Policy
	at org.zalando.riptide.autoconfigure.RiptideAutoConfiguration.riptidePostProcessor(RiptideAutoConfiguration.java:37)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at org.springframework.beans.factory.support.SimpleInstantiationStrategy.instantiate(SimpleInstantiationStrategy.java:154)
	... 43 more

Possible Fix

Check what constructor referenced unconditionally and got Policy as argument.

Steps to Reproduce

  1. Create maven spring boot project via start.spring.io
  2. Add riptide-spring-boot-starter as dependency
  3. Run ./mvnw test

Context

Your Environment

  • Version used: RC.6-RC-8
  • Link to your project:

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
whiskeysierracommented, Feb 24, 2020

@jrehwaldt Your suggestion was spot-on! Getting rid of this direct reference to RequestPolicy did the trick. (Locally at least 🤞)

1reaction
whiskeysierracommented, Feb 6, 2020

If you provide a failing test, I’ll fix it 😁

Read more comments on GitHub >

github_iconTop Results From Across the Web

Maven Failsafe Plugin – Project Dependencies
The following is a list of compile dependencies for this project. These dependencies are required to compile and run the application: ...
Read more >
Dependency convergence error - maven - Stack Overflow
If a project has two dependencies, A and B, both depending on the same artifact, C, this rule will fail the build if...
Read more >
CRR: NIST Cybersecurity Framework Crosswalks - CISA
Permission is required for any other external and/or commercial use. ... RC.RP-1: Recovery plan is executed during or after a cybersecurity incident.
Read more >
Configuring and managing high availability clusters Red Hat ...
For example, in a 6-node cluster, quorum is established when at least 4 ... This is a required dependency for configuring a GFS2...
Read more >
Duo Unix - Two-Factor Authentication for SSH (login_duo)
Once the required dependencies are built and installed, ... Print the contents of /etc/motd to screen after a successful login.
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