[jboss-user] [Beginner's Corner] New message: "How to upgrade Hibernate Validator in JBoss 5.0.1"

Pradeep Chaudhary do-not-reply at jboss.com
Sat Feb 13 02:28:08 EST 2010

User development,

A new message was posted in the thread "How to upgrade Hibernate Validator in JBoss 5.0.1":


Author  : Pradeep Chaudhary
Profile : http://community.jboss.org/people/pradjboss1

I need to upgrade Hibernate Validator to latest version of 4.0.2.GA. I know that it is included as part of JBoss 6.0.0.M1. But I need to do it in JBoss 5.0.1.GA Is there any documentation on how to do it ?
If the jar files are in my WEB-INF/lib directory then the following error is returned:
*12:51:54,537 ERROR [STDERR] javax.validation.ValidationException: Unable to find a default provider
 12:51:54,537 ERROR [STDERR]     at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:264)*
I have tried by replacing the hibernate-validator.jar with the hibernate-validator-4.0.2.GA.jar and also added required validation-api-1.0.0.GA.jar files to jboss-5.1.0.GA/common/lib directory or server/lib directory.
But it does not resolves the problem. Error changes to :
*12:54:55,707 ERROR [STDERR] javax.validation.ValidationException: Unable to get available provider resolvers.
12:54:55,708 ERROR [STDERR]     at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:259)
12:54:55,708 ERROR [STDERR]     at javax.validation.Validation.buildDefaultValidatorFactory(Validation.java:111)*
12:54:55,710 ERROR [STDERR]     at org.quartz.core.JobRunShell.run(JobRunShell.java:202)
12:54:55,710 ERROR [STDERR]     at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)
*12:54:55,710 ERROR [STDERR] Caused by: java.lang.ClassCastException: org.hibernate.validator.HibernateValidator cannot be cast to javax.validation.spi.ValidationProvider*
12:54:55,711 ERROR [STDERR]     at javax.validation.Validation$DefaultValidationProviderResolver.getValidationProviders(Validation.java:332)
12:54:55,711 ERROR [STDERR]     at javax.validation.Validation$GenericBootstrapImpl.configure(Validation.java:25
Please provide steps on how can I get JBoss to refer to new version of validator.
Thanks in advance.


To reply to this message visit the message page: http://community.jboss.org/message/526183#526183

More information about the jboss-user mailing list