-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 
Author Message
 Post subject: hibernate-annotations.jar dependency with Validator
PostPosted: Mon Jan 04, 2010 3:12 pm 
Newbie

Joined: Sun Jan 03, 2010 6:27 am
Posts: 3
I downloaded hibernate-validator-4.0.2.GA to use as validator in a stand alone application. But it seems that some of the dependencies (hibernate-annotations.jar) is not avaliable as part of Validator zip. So i have included the annotations jar to my build path to import s below classes. Is it not part of the Validator component then ? please correct me if am wrong.

Code:
import org.hibernate.validator.ClassValidator;
import org.hibernate.validator.InvalidValue;


Top
 Profile  
 
 Post subject: Re: hibernate-annotations.jar dependency with Validator
PostPosted: Mon Jan 04, 2010 5:31 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hibernate Validator 4.x does not depend on annotations. The classes you mention are part of the legacy Validator code base (3.x). You should not use them. In Bean Validation (JSR 303) for which Hibernate Validator is the reference implementation the core validator class is javax.validation.Validator.

What are you trying to do? Are you converting an existing application which was using Validator 3.x?

--Hardy


Top
 Profile  
 
 Post subject: Re: hibernate-annotations.jar dependency with Validator
PostPosted: Tue Jan 05, 2010 12:51 am 
Newbie

Joined: Sun Jan 03, 2010 6:27 am
Posts: 3
Hi Hardy,
Thanks for the reply.

Basically i m trying to implement validator framework in my stand alone application. I have got beans which are loaded with the data from xml and this needs to be validated against the business rules.
Also i would like to externalize the validations in an xml , so that when requirement i dont need to change the annotations and recompile over.

The online examples which i have seen are using the below mentioned classes. can you please point good where i can get info how to use hibernate 4.x validation.

Code:
import org.hibernate.validator.ClassValidator;
import org.hibernate.validator.InvalidValue;


Top
 Profile  
 
 Post subject: Re: hibernate-annotations.jar dependency with Validator
PostPosted: Tue Jan 05, 2010 7:18 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
https://www.hibernate.org/5.html#A18
http://docs.jboss.org/hibernate/stable/ ... ml_single/


Top
 Profile  
 
 Post subject: Re: hibernate-annotations.jar dependency with Validator
PostPosted: Tue Jan 05, 2010 1:58 pm 
Newbie

Joined: Sun Jan 03, 2010 6:27 am
Posts: 3
Thanks. perhaps i should have searched here..


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.