Hibernate Validator throws exception is class impements multiple interfaces with same method

Solution Unverified - Updated -

Issue

Is it a Hibernate Validator bug that the Exception is thrown if the bean implement two interfaces with annotation?

javax.validation.ConstraintDeclarationException: 
Only the root method of an overridden method in an inheritance hierarchy 
may be annotated with parameter constraints, but there are parameter 
constraints defined at all of the following overridden methods: 
[ConstrainedMethod [location=Validation#checkNotNull(), 
parameterMetaData=[ParameterMetaData 
[location=Validation#checkNotNull(0)], name=arg0], 
constraints=[NotNull], isCascading=false]], 
hasParameterConstraints=true], ConstrainedMethod 
[location=ValidationLocal#checkNotNull(), 
parameterMetaData=[ParameterMetaData 
[location=ValidationLocal#checkNotNull(0)], name=arg0], 
constraints=[NotNull], isCascading=false]], hasParameterConstraints=true]]

Environment

  • JBoss Enterprise Application Platform (EAP) 6

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.