-->
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: Which versions work together: Hibernate / Spring / Validator
PostPosted: Fri Dec 04, 2009 10:59 am 
Beginner
Beginner

Joined: Fri Jul 08, 2005 8:55 pm
Posts: 37
Hi

This may be a very newbie question but... I'd like to use Hibernate 3.3.2.GA, Validator 4.0.2.GA and Spring 3 RC2...

It seems that there is no way to set up the usual pre-insert/pre-update listeners

Some example refer to org.hibernate.cfg.beanvalidation.BeanValidationEventListener
but that class does not seem to be in any GA Jar...

Is there a way to set this up with GA jars only (no beta at work!)

If not, has someone managed to write a class to do this? Or should I grab BeanValidationEventListener from the 3.5.0 beta source tree?
(this however seems to require more classes)

Many thanks

Benoit


Top
 Profile  
 
 Post subject: Re: Which versions work together: Hibernate / Spring / Validator
PostPosted: Fri Dec 04, 2009 2:19 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
If you really want to use only GA jars you have to have your own copy of BeanValidationEvenListener and the other classes it needs (I think it is only one more, max two). The listeners are currently part of Hibernate 3.5 (currently beta2).
Otherwise have a look at this thread - viewtopic.php?f=9&t=999747 , but I guess you might have seen it already :)

--Hardy


Top
 Profile  
 
 Post subject: Re: Which versions work together: Hibernate / Spring / Validator
PostPosted: Fri Dec 04, 2009 4:23 pm 
Beginner
Beginner

Joined: Fri Jul 08, 2005 8:55 pm
Posts: 37
Thanks for replying.

I had a look at this thread indeed. I found it strange that the GAs were not consistent...

I've added the BeanValidationEvenListener + 2 classes from the 3.5 trunk (hopefully they should work) but I noticed that on launch of my Spring Application the log says that it did NOT find a Hibernate Validator in the path... Am I right in assuming that this is an invalid message as the hibernate 3.3.2 code is trying to load a class that is no longer in the Validator 4.0.2.GA jar? But that should not matter since I've added the pre-insert and pre-update listener?

I have not had a chance to try to store something invalid yet...

Thanks & regards
Benoit


Top
 Profile  
 
 Post subject: Re: Which versions work together: Hibernate / Spring / Validator
PostPosted: Fri Dec 04, 2009 4:33 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Hi,

not sure what this message means in Spring. You might want to ask this on the Spring forum. If validation works I would assume it's correct.

--Hardy


Top
 Profile  
 
 Post subject: Re: Which versions work together: Hibernate / Spring / Validator
PostPosted: Fri Dec 04, 2009 4:58 pm 
Beginner
Beginner

Joined: Fri Jul 08, 2005 8:55 pm
Posts: 37
The message is a Hibernate 3.3.2 message which, I believe, is the result of searching for a hardcode class name in the path.
This class is no longer in Hibernate-validator 4.0.2.GA and therefore it sends this warning...

I'll check on Monday whether the validation is happening...

Thanks

B


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.