Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about Collectives
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
Exception :-
jakarta.validation.NoProviderFoundException: Unable to create a
Configuration, because no Jakarta Bean Validation provider could be
found. Add a provider like Hibernate Validator (RI) to your classpath.
jakarta.validation.Validation$GenericBootstrapImpl.configure(Validation.java:291)
~[jakarta.validation-api-3.0.2.jar:na] at
jakarta.validation.Validation.buildDefaultValidatorFactory(Validation.java:103)
~[jakarta.validation-api-3.0.2.jar:na] at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.getValidatorFactory(TypeSafeActivator.java:479)
~[hibernate-core-6.1.6.Final.jar:6.1.6.Final] at
org.hibernate.cfg.beanvalidation.TypeSafeActivator.activate(TypeSafeActivator.java:82)
~[hibernate-core-6.1.6.Final.jar:6.1.6.Final] at
......
....org.springframework.boot.SpringApplication.run(SpringApplication.java:308)
~[spring-boot-3.0.2.jar:3.0.2] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1302)
~[spring-boot-3.0.2.jar:3.0.2] at
org.springframework.boot.SpringApplication.run(SpringApplication.java:1291)
~[spring-boot-3.0.2.jar:3.0.2] at
com.spring.security.MicroServiceServer1Application.main(MicroServiceServer1Application.java:10)
~[classes/:na] at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
Method) ~[na:na] at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
~[na:na] at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
~[na:na] at
java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]
org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)
~[spring-boot-devtools-3.0.2.jar:3.0.2]org.hibernate.cfg.beanvalidation.BeanValidationIntegrator.integrate(BeanValidationIntegrator.java:137)
Maven Dependency :-
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.0.2</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.mysql</groupId>
<artifactId>mysql-connector-j</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
I have to Document my apis so i added the OpenAPI and my Spring boot project is Spring Boot 3.
so I added and It's throwing a NoProviderFoundException but OpenAPI Works fine but I can't understand why it's come so i search so many time in every where but I doesn't get my answer so.
Please any one have knowledge then please reply.
I have Added Jakarta Validation Also but still exception coming
dependency :-
<dependency>
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
</dependency>
*** Thank You ***
Instead of adding jakarta.validation-api
as dependency, try spring-boot-starter-validation
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.