Hibernate Books

All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: hibernate-annotations and validation-api versions?
PostPosted: Tue Oct 20, 2009 9:18 am 
Newbie

Joined: Tue Oct 20, 2009 9:12 am
Posts: 1
I'm using

hibernate-validator: 4.0.0.GA
validation-api: 1.0.0.GA
hibernate-annotations: 3.4.0-GA

Then I get the following exception

Caused by: java.lang.NoSuchMethodError: javax.validation.Validator.getConstraintsForClass(Ljava/lang/Class;)Ljavax/validation/BeanDescriptor;
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:113)
at org.hibernate.cfg.beanvalidation.TypeSafeActivator.applyDDL(TypeSafeActivator.java:99)
... 65 more

Which is logical since the validation-api has the BeanDescriptor in the metadata package, while the TypeSafeActivator has the BeanDescriptor in the validation package.

public abstract javax.validation.metadata.BeanDescriptor getConstraintsForClass(java.lang.Class arg0);

Is this a bug, or is it not supported to use validation-api 1.0.0.GA with hibernate-annotations 3.4.0-GA?

Thanks,

Philippe


Top
 Profile  
 
 Post subject: Re: hibernate-annotations and validation-api versions?
PostPosted: Thu Oct 29, 2009 11:27 am 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
For now it would probably be best to have a custom/own version of BeanValidationEventListener

See also - viewtopic.php?f=9&t=1000537

--Hardy


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 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.