You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@bval.apache.org by Francesco Chicchiricc�� <il...@apache.org> on 2018/11/02 16:21:04 UTC

Upgrade to BVal 2.0.0: javax.validation.ConstraintDeclarationException: Illegal strengthening: overridden [constraints] in inheritance hierarchy

Hi all,
I am trying to upgrade BVal to 2.0.0 in Syncope.

I have changed my POMs as follows:

* javax.validation:validation-api from 1.1.0.Final to 2.0.1.Final
* org.apache.bval:bval-jsr from 1.1.2 to 2.0.0

When I try to reach up some of the REST services (based on CXF 3.2), an exception as [1] is thrown; I have read about such exception, but it seems to me that the mentioned methods in interface [2] and implementation [3] should comply with hierarchy rules.

Nevertheless, if I swap

org.apache.bval:bval-jsr:2.0.0

with

org.hibernate.validator:hibernate-validator:6.0.13.Final

all is working fine.

Any idea?

TIA
Regards.

[1] https://paste.apache.org/hxvY
[2] https://github.com/apache/syncope/blob/2_1_X/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L70
[3] https://github.com/apache/syncope/blob/2_1_X/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java#L68

Re: Upgrade to BVal 2.0.0: javax.validation.ConstraintDeclarationException: Illegal strengthening: overridden [constraints] in inheritance hierarchy

Posted by Francesco Chicchiricc�� <il...@apache.org>.
On 2018/11/04 01:16:21, Matt Benson <mb...@apache.org> wrote: 
> Hi Francesco,
> I'm on my phone, but if I'm reading the linked code correctly, you have no
> constraints declared on the abstract implementation class, so as far as I
> recall off the top of my head you are correct that there should be no
> opportunity for an exception of this type. I will be happy to take a look
> at this in the near future (we already have other tweaks to release as
> v2.0.1); feel free to create a JIRA issue and/or suggest a patch if you dig
> into the code before one of us does.

Done: https://issues.apache.org/jira/browse/BVAL-167

Thanks for you answer.
Regards.

> On Fri, Nov 2, 2018, 11:21 AM Francesco Chicchiriccò <ilgrosso@apache.org
> wrote:
> 
> > Hi all,
> > I am trying to upgrade BVal to 2.0.0 in Syncope.
> >
> > I have changed my POMs as follows:
> >
> > * javax.validation:validation-api from 1.1.0.Final to 2.0.1.Final
> > * org.apache.bval:bval-jsr from 1.1.2 to 2.0.0
> >
> > When I try to reach up some of the REST services (based on CXF 3.2), an
> > exception as [1] is thrown; I have read about such exception, but it seems
> > to me that the mentioned methods in interface [2] and implementation [3]
> > should comply with hierarchy rules.
> >
> > Nevertheless, if I swap
> >
> > org.apache.bval:bval-jsr:2.0.0
> >
> > with
> >
> > org.hibernate.validator:hibernate-validator:6.0.13.Final
> >
> > all is working fine.
> >
> > Any idea?
> >
> > TIA
> > Regards.
> >
> > [1] https://paste.apache.org/hxvY
> > [2]
> > https://github.com/apache/syncope/blob/2_1_X/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L70
> > [3]
> > https://github.com/apache/syncope/blob/2_1_X/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java#L68

Re: Upgrade to BVal 2.0.0: javax.validation.ConstraintDeclarationException: Illegal strengthening: overridden [constraints] in inheritance hierarchy

Posted by Matt Benson <mb...@apache.org>.
Hi Francesco,
I'm on my phone, but if I'm reading the linked code correctly, you have no
constraints declared on the abstract implementation class, so as far as I
recall off the top of my head you are correct that there should be no
opportunity for an exception of this type. I will be happy to take a look
at this in the near future (we already have other tweaks to release as
v2.0.1); feel free to create a JIRA issue and/or suggest a patch if you dig
into the code before one of us does.

Matt

On Fri, Nov 2, 2018, 11:21 AM Francesco Chicchiriccò <ilgrosso@apache.org
wrote:

> Hi all,
> I am trying to upgrade BVal to 2.0.0 in Syncope.
>
> I have changed my POMs as follows:
>
> * javax.validation:validation-api from 1.1.0.Final to 2.0.1.Final
> * org.apache.bval:bval-jsr from 1.1.2 to 2.0.0
>
> When I try to reach up some of the REST services (based on CXF 3.2), an
> exception as [1] is thrown; I have read about such exception, but it seems
> to me that the mentioned methods in interface [2] and implementation [3]
> should comply with hierarchy rules.
>
> Nevertheless, if I swap
>
> org.apache.bval:bval-jsr:2.0.0
>
> with
>
> org.hibernate.validator:hibernate-validator:6.0.13.Final
>
> all is working fine.
>
> Any idea?
>
> TIA
> Regards.
>
> [1] https://paste.apache.org/hxvY
> [2]
> https://github.com/apache/syncope/blob/2_1_X/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L70
> [3]
> https://github.com/apache/syncope/blob/2_1_X/core/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractAnyService.java#L68
>