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

WebFlux or MVC app with the Validation API and no implementation fails to start #16177

Closed
wilkinsona opened this issue Mar 8, 2019 · 2 comments
Assignees
Labels
type: bug A general bug
Milestone

Comments

@wilkinsona
Copy link
Member

2019-03-08 17:10:01.946 [main] DEBUG o.s.b.d.LoggingFailureAnalysisReporter - Application failed to start due to an exception
javax.validation.NoProviderFoundException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
    at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:291)
    at org.springframework.boot.validation.MessageInterpolatorFactory.getObject(MessageInterpolatorFactory.java:53)
    at org.springframework.boot.autoconfigure.validation.ValidatorAdapter.create(ValidatorAdapter.java:138)
    at org.springframework.boot.autoconfigure.validation.ValidatorAdapter.getExistingOrCreate(ValidatorAdapter.java:119)
    at org.springframework.boot.autoconfigure.validation.ValidatorAdapter.get(ValidatorAdapter.java:111)
    at org.springframework.boot.autoconfigure.web.reactive.WebFluxAutoConfiguration$EnableWebFluxConfiguration.webFluxValidator(WebFluxAutoConfiguration.java:243)
@wilkinsona wilkinsona added this to the 2.1.x milestone Mar 8, 2019
@wilkinsona wilkinsona added the type: bug A general bug label Mar 8, 2019
@mbhave
Copy link
Contributor

mbhave commented Mar 22, 2019

@wilkinsona Not sure if this was intended to be WebFlux specific? I was able to reproduce this for an MVC app as well

javax.validation.NoProviderFoundException: Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.
	at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:291)
	at org.springframework.boot.validation.MessageInterpolatorFactory.getObject(MessageInterpolatorFactory.java:53)
	at org.springframework.boot.autoconfigure.validation.ValidatorAdapter.create(ValidatorAdapter.java:138)
	at org.springframework.boot.autoconfigure.validation.ValidatorAdapter.getExistingOrCreate(ValidatorAdapter.java:119)
	at org.springframework.boot.autoconfigure.validation.ValidatorAdapter.get(ValidatorAdapter.java:111)
	at org.springframework.boot.autoconfigure.web.servlet.WebMvcAutoConfiguration$EnableWebMvcConfiguration.mvcValidator(WebMvcAutoConfiguration.java:519)

@wilkinsona
Copy link
Member Author

It wasn’t. Thanks for spotting that MVC is affected too.

@wilkinsona wilkinsona changed the title WebFlux app with the Validation API and no implementation fails to start WebFlux or MVC app with the Validation API and no implementation fails to start Mar 24, 2019
@mbhave mbhave self-assigned this Mar 29, 2019
@mbhave mbhave modified the milestones: 2.1.x, 2.1.4 Apr 1, 2019
@mbhave mbhave closed this as completed in 768aa5d Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug A general bug
Projects
None yet
Development

No branches or pull requests

2 participants