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, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content