Skip to content
Advertisement

Getting error : org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/validation/ValidatorFactory

I have a project Webservice with Hibernate in Eclipse (Tomcat v10.0 et java JDK 8). When I run, I got this error: ” Servlet.service() for servlet [Jersey Web Application] in context with path [/musichall] threw exception [org.glassfish.jersey.server.ContainerException: java.lang.NoClassDefFoundError: javax/validation/ValidatorFactory] with root cause java.lang.ClassNotFoundException: javax.validation.ValidatorFactory”

Below is my pom.xml

JavaScript

Here is my file “persistence.xml”

JavaScript

Here is the “MusicienService” class

JavaScript

Here is the “MusicienController” class

JavaScript

Error message

JavaScript

Thanks you a lot!!!

Advertisement

Answer

javax.validation.ValidatorFactory exists in the dependency below:

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement