Skip to content

Cannot configure validationMessageSource when using Hibernate 5 as validation implementation [SPR-10466] #15099

@spring-projects-issues

Description

@spring-projects-issues

David J. M. Karlsen opened SPR-10466 and commented

I configure the validation factory like this:

<bean id="validatorFactory"
     class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean">
     <property name="validationMessageSource">
          <ref bean="messageSource" />
     </property>
</bean>

and this throws this exception:

 Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validatorFactory' defined in class path resource [META-INF/spring/validation-context.xml]: Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'validationMessageSource' threw exception; nested exception is java.lang.NoClassDefFoundError: org/hibernate/validator/resourceloading/ResourceBundleLocator

it works just fine with Hibernate Validator v4.x but fails with the latest 5.0.0.Final


Affects: 3.2.2

Issue Links:

1 votes, 4 watchers

Metadata

Metadata

Assignees

Labels

in: coreIssues in core modules (aop, beans, core, context, expression)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions