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

spring-boot-starter-validation 2.5.0 is not working with hibernate-validator 7.0.1.Final #26705

Closed
ahoehma opened this issue May 29, 2021 · 6 comments
Labels
status: invalid An issue that we don't feel is valid

Comments

@ahoehma
Copy link
Contributor

ahoehma commented May 29, 2021

I try to combine

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-validation</artifactId>
    <version>2.5.0</version>
</dependency>
<dependency>
   <groupId>org.hibernate.validator</groupId>
   <artifactId>hibernate-validator</artifactId>
   <version>7.0.1.Final</version>
</dependency>

Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.validation.beanvalidation.LocalValidatorFactoryBean' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

I guess because of the name changes in hibernate-validator (I'm not sure since when) ... the service name is now this:

/META-INF/services/jakarta.validation.spi.ValidationProvider

Spring is searching for

META-INF/services/javax.validation.spi.ValidationProvider

Would it be an idea to have support for both?

@bclozel
Copy link
Member

bclozel commented May 29, 2021

Spring Boot will support the jakarta namespace as soon as Spring Framework supports it.
This is currently scheduled for Spring Framework 6.0 (meaning, Spring Boot 3.0).

@bclozel bclozel closed this as completed May 29, 2021
@bclozel bclozel added the status: invalid An issue that we don't feel is valid label May 29, 2021
@rifqifakhirin
Copy link

rifqifakhirin commented Jun 3, 2021

springboot 2.5.0 support for hibernate-validator 6.2.0.final, just change the hibernate-validator version in dependency to make validation work again

@ahoehma
Copy link
Contributor Author

ahoehma commented Sep 22, 2021

springboot 2.5.0 support for hibernate-validator 6.2.0.final, just change the hibernate-validator version in dependency to make validation work again

haha i came back to here because today i did another update-check for my app :)

for hibernate-validator 6.2.0.final I have a vulnerable findings ... so thats why I need a newer version.

@snicoll
Copy link
Member

snicoll commented Sep 22, 2021

I am not aware of a CVE in 6.2.0.Final and this is the latest version in that line. This would have to be redirected to the team managing this project and we can upgrade in due course accordingly.

@bclozel
Copy link
Member

bclozel commented Sep 22, 2021

There were false positives on reports for CVE-2020-10693, but it seems detection is now fixed. Is that the CVE you're referring to?

@ahoehma
Copy link
Contributor Author

ahoehma commented Dec 16, 2021

@bclozel yes this was my CVE ... works now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: invalid An issue that we don't feel is valid
Projects
None yet
Development

No branches or pull requests

4 participants