0

i have downloaded hibernate release 5.4.4 final and in eclipse i have build in path these jars but in that don't have hibernate validator jar and i need it can anyone suggest me that which version i have to download or i have to download hibernate validator separately? Actually i have a class that class have parameter like name,email and password on which i want to use annotation like notblank email formate etc by using 5.4.4 version i am not getting these annotation and i have mention in above line that in 5.4.4 version these is no hibernate validator jar so please suggest me that which version i should download so that i can use these addition annotation too if appreciable if anyone can provide me the link of appropriate version Thank you

see the screen shots

I am not using maven and adding my jars manually This how i have added hibernate validator,hibernate core jars in build path does it correct or not?

hibernate validator jar with bean and anntotion hibernate validator hibernate core jar with controller classhivernate core jar orm spring jar spring jar Error console error console in eclipsejava.lang.ClassNotFoundException: javax.validation.constraints.Pattern$Flageclipse console error on browser side when i make request to application sayingjavax.servlet.ServletException: java.lang.NoClassDefFoundError: [Ljavax/validation/constraints/Pattern$Flag; [![browser error][5]][5] please help me to fix this error thank you

1 Answers1

0

You could download the hibernate-validator for eclipse using this link https://sourceforge.net/projects/hibernate/files/hibernate-validator/6.1.5.Final/

  • does it also contains all basic hibernate jar? or i have to download other jar also individually #Sanju Keshavan – siddhant sahani Jun 06 '20 at 11:39
  • This contains only the hibernate validator dependencies. You could get other hibernate jars from its ORM dependency https://sourceforge.net/projects/hibernate/files/hibernate-orm/5.4.17.Final/ – Sanju Keshavan Jun 06 '20 at 15:36
  • if i am using hibernate validator 6.1.5 final and if i use hibernate ORM different version jar then it will work? or i have to download same version of hibernate validator and hibernate ORM jar – siddhant sahani Jun 07 '20 at 05:37
  • 1
    It should work with different version of hibernate validator and orm dependencies. You could refer this [link](https://www.baeldung.com/hibernate-validator-constraints) – Sanju Keshavan Jun 07 '20 at 09:47
  • sir i have gone through the link you gave in which article they have added dependencies via pom.xml that is maven project example but in my case i am not using maven just simply i have download the jar files of validator and ROM please share the link or idea that how we can integrate hibernate and spring without maven – siddhant sahani Jun 08 '20 at 11:51
  • i have added the screen shots of my issues in my post please have a look Sanju keshavan – siddhant sahani Jun 08 '20 at 13:16
  • @siddhantsahani here is a reference [link](http://javaonlineguide.net/2015/03/spring-4-and-hibernate-4-integration-example-project-in-eclipse-without-maven-support.html) on how to use hibernate with spring without maven. though its for a bit older version, i guess it could still guide you. – Sanju Keshavan Jun 12 '20 at 14:05
  • For the exception you mentioned in the screenshot may be possibility of validation-api jar conflict. You may refer this issue for more clarity on this [link](https://stackoverflow.com/questions/26637800/classnotfoundexception-javax-validation-validatorfactory) – Sanju Keshavan Jun 12 '20 at 14:07