[WLS12.1.3]-java.lang.ClassCastException: weblogic.validation.validator.ValidationProvider cannot be cast to javax.validation.spi.ValidationProvider (Doc ID 2016225.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle WebLogic Server - Version 12.1.3.0.0 and later
Information in this document applies to any platform.

Symptoms

On WLS 12.1.3 deploying application with hibernate-validator-4.3.0.Final.jar&validation-api-1.0.0.GA.jar within the WEB-INF/LIB fails with below trace.Same ear deploys just fine on WLS 12.1.2

javax.validation.ValidationException: Unable to get available provider resolvers.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1482)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:521)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)
....
Caused By: javax.validation.ValidationException: Unable to get available provider resolvers.
at javax.validation.Validation$ProviderSpecificBootstrapImpl.configure(Validation.java:213)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.<init>(MethodValidationInterceptor.java:66)
at org.springframework.validation.beanvalidation.MethodValidationPostProcessor.afterPropertiesSet(MethodValidationPostProcessor.java:102)
....
Caused By: java.lang.ClassCastException: weblogic.validation.validator.ValidationProvider cannot be cast to javax.validation.spi.ValidationProvider
at javax.validation.Validation$DefaultValidationProviderResolver.getValidationProviders(Validation.java:332)
at javax.validation.Validation$ProviderSpecificBootstrapImpl.configure(Validation.java:210)
at org.springframework.validation.beanvalidation.MethodValidationInterceptor.<init>(MethodValidationInterceptor.java:66)
....

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms