Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

321
Visualizações
Getting javax.validation.NoProviderFoundException exception even after adding the dependencies

I am new to Java and maven. I might be missing something obvious, but I am not able to figure it out.

I was trying to add javax validations to my project following the link : https://www.baeldung.com/javax-validation

And I have added the following dependencies

      <dependency>
        <groupId>javax.validation</groupId>
        <artifactId>validation-api</artifactId>
        <version>2.0.1.Final</version>
      </dependency>
      <dependency>
        <groupId>org.hibernate</groupId>
        <artifactId>hibernate-validator</artifactId>
        <version>6.0.13.Final</version>
      </dependency>
      <dependency>
        <groupId>org.glassfish</groupId>
        <artifactId>javax.el</artifactId>
        <version>3.0.0</version>
      </dependency>

I have tried group ids org.hibernate and org.hibernate.validator also.

But I was getting a runtime error during the execution of buildDefaultValidatorFactory() of:

import javax.validation.Validation;
import javax.validation.Validator;
Validator validator = Validation.buildDefaultValidatorFactory().getValidator();

I was getting the following error

Method threw 'javax.validation.NoProviderFoundException' exception.
Unable to create a Configuration, because no Bean Validation provider could be found. Add a provider like Hibernate Validator (RI) to your classpath.

What am I missing? Let me know if you need some key info. I have been fighting with this for hours. So, thanks in advance.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Remove the hibernate and glassfish validation. Just keep javax one. Clean your project properly.

Then right do project->runas->maven build ->clean install once.

At the same time you can update your project also click on project ->maven>update project

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda