You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Francesco Chicchiriccò <il...@apache.org> on 2018/03/20 15:05:44 UTC

Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Hi all,
I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now I 
start getting exceptions as

javax.ws.rs.ProcessingException: Method 
org.apache.syncope.common.rest.api.service.AnyObjectService.read is not 
a valid resource method

where it seems that the given method [2] is not considered even though 
it is overriding [3], which is properly annotated.

This works fine with 3.2.2 (and 3.1.15 on another branch).

Any thought?
Regards.

[1] 
https://github.com/apache/syncope/commit/cb42911816b5006dbc720de1dc2d83946c9376bc
[2] 
https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java#L67
[3] 
https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L99

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Posted by Andriy Redko <dr...@gmail.com>.
Thanks Colm, may be we should reopen this guy, https://issues.apache.org/jira/browse/CXF-7670 ?

Best Regards,
    Andriy Redko

Tuesday, March 20, 2018, 1:57:36 PM, you wrote:

COh> We should probably create a JIRA for this regression to document it.

COh> Colm.

COh> On Tue, Mar 20, 2018 at 4:39 PM, Francesco Chicchiriccò <ilgrosso@apache.org
>> wrote:

>> On 20/03/2018 16:54, Andriy Redko wrote:

>>> Hi Francesco,

>>> Sorry, haven't had a time to look closely on the issue yet, but it could
>>> be related to
>>> https://github.com/apache/cxf/pull/388/files I think. Would you be able
>>> to verify if
>>> the regression has been introduced in there? Thank you.


>> Hi Andriy,
>> thanks for your reply.

>> I have grabbed

>> rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/
>> ResourceUtils.java

>> before commit

>> 39627271ef7cc88609cc9c028b03ea4298b830cc

>> and put in Syncope sources: I confirm all works as expected.

>> FYI I've committed such (hopefully temporary) change to Syncope, waiting
>> for the actual fix to come:

>> https://github.com/apache/syncope/commit/3fa2a5aaa7428a90611
>> eb80006033cb1f6a5aca8

>> Regards.

>> FC> Hi all,
>>> FC> I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now
>>> I
>>> FC> start getting exceptions as

>>> FC> javax.ws.rs.ProcessingException: Method
>>> FC> org.apache.syncope.common.rest.api.service.AnyObjectService.read is
>>> not
>>> FC> a valid resource method

>>> FC> where it seems that the given method [2] is not considered even though
>>> FC> it is overriding [3], which is properly annotated.

>>> FC> This works fine with 3.2.2 (and 3.1.15 on another branch).

>>> FC> Any thought?
>>> FC> Regards.

>>> FC> [1]
>>> FC> https://github.com/apache/syncope/commit/cb42911816b5006dbc7
>>> 20de1dc2d83946c9376bc
>>> FC> [2]
>>> FC> https://github.com/apache/syncope/blob/master/common/rest-
>>> api/src/main/java/org/apache/syncope/common/rest/api/
>>> service/AnyObjectService.java#L67
>>> FC> [3]
>>> FC> https://github.com/apache/syncope/blob/master/common/rest-
>>> api/src/main/java/org/apache/syncope/common/rest/api/
>>> service/AnyService.java#L99


>> --
>> Francesco Chicchiriccò

>> Tirasa - Open Source Excellence
>> http://www.tirasa.net/

>> Member at The Apache Software Foundation
>> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
>> http://home.apache.org/~ilgrosso/






Re: Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Posted by Colm O hEigeartaigh <co...@apache.org>.
We should probably create a JIRA for this regression to document it.

Colm.

On Tue, Mar 20, 2018 at 4:39 PM, Francesco Chicchiriccò <ilgrosso@apache.org
> wrote:

> On 20/03/2018 16:54, Andriy Redko wrote:
>
>> Hi Francesco,
>>
>> Sorry, haven't had a time to look closely on the issue yet, but it could
>> be related to
>> https://github.com/apache/cxf/pull/388/files I think. Would you be able
>> to verify if
>> the regression has been introduced in there? Thank you.
>>
>
> Hi Andriy,
> thanks for your reply.
>
> I have grabbed
>
> rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/
> ResourceUtils.java
>
> before commit
>
> 39627271ef7cc88609cc9c028b03ea4298b830cc
>
> and put in Syncope sources: I confirm all works as expected.
>
> FYI I've committed such (hopefully temporary) change to Syncope, waiting
> for the actual fix to come:
>
> https://github.com/apache/syncope/commit/3fa2a5aaa7428a90611
> eb80006033cb1f6a5aca8
>
> Regards.
>
> FC> Hi all,
>> FC> I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now
>> I
>> FC> start getting exceptions as
>>
>> FC> javax.ws.rs.ProcessingException: Method
>> FC> org.apache.syncope.common.rest.api.service.AnyObjectService.read is
>> not
>> FC> a valid resource method
>>
>> FC> where it seems that the given method [2] is not considered even though
>> FC> it is overriding [3], which is properly annotated.
>>
>> FC> This works fine with 3.2.2 (and 3.1.15 on another branch).
>>
>> FC> Any thought?
>> FC> Regards.
>>
>> FC> [1]
>> FC> https://github.com/apache/syncope/commit/cb42911816b5006dbc7
>> 20de1dc2d83946c9376bc
>> FC> [2]
>> FC> https://github.com/apache/syncope/blob/master/common/rest-
>> api/src/main/java/org/apache/syncope/common/rest/api/
>> service/AnyObjectService.java#L67
>> FC> [3]
>> FC> https://github.com/apache/syncope/blob/master/common/rest-
>> api/src/main/java/org/apache/syncope/common/rest/api/
>> service/AnyService.java#L99
>>
>
> --
> Francesco Chicchiriccò
>
> Tirasa - Open Source Excellence
> http://www.tirasa.net/
>
> Member at The Apache Software Foundation
> Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
> http://home.apache.org/~ilgrosso/
>
>


-- 
Colm O hEigeartaigh

Talend Community Coder
http://coders.talend.com

Re: Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Posted by Francesco Chicchiriccò <il...@apache.org>.
Hi Andriy,
thanks for your investigation: I see that CXF-7670 is still open, I've 
linked this discussion there.

Regards.

On 21/03/2018 03:12, Andriy Redko wrote:
> Hi Francesco,
>
> I was able to reproduce the problem, there is an understanding what is going on but
> not yet clear how to fix it. Essentially, the read() method in question is mapped to
> the same annotated method 2 times. Previously, this case was not caught, ending up
> with 2 resource operation infos, but with the CXF-7670 it does, hereby ProcessingException
> is being raised. It seems like it is too late to have it fixed in 3.2.3 though ... :(
>
> Best Regards,
>      Andriy Redko
>
>
> FC> On 20/03/2018 16:54, Andriy Redko wrote:
>>> Hi Francesco,
>>> Sorry, haven't had a time to look closely on the issue yet, but it could be related to
>>> https://github.com/apache/cxf/pull/388/files I think. Would you be able to verify if
>>> the regression has been introduced in there? Thank you.
> FC> Hi Andriy,
> FC> thanks for your reply.
>
> FC> I have grabbed
>
> FC> rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java
>
> FC> before commit
>
> FC> 39627271ef7cc88609cc9c028b03ea4298b830cc
>
> FC> and put in Syncope sources: I confirm all works as expected.
>
> FC> FYI I've committed such (hopefully temporary) change to Syncope, waiting
> FC> for the actual fix to come:
>
> FC> https://github.com/apache/syncope/commit/3fa2a5aaa7428a90611eb80006033cb1f6a5aca8
>
> FC> Regards.
>
>>> FC> Hi all,
>>> FC> I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now I
>>> FC> start getting exceptions as
>>> FC> javax.ws.rs.ProcessingException: Method
>>> FC> org.apache.syncope.common.rest.api.service.AnyObjectService.read is not
>>> FC> a valid resource method
>>> FC> where it seems that the given method [2] is not considered even though
>>> FC> it is overriding [3], which is properly annotated.
>>> FC> This works fine with 3.2.2 (and 3.1.15 on another branch).
>>> FC> Any thought?
>>> FC> Regards.
>>> FC> [1]
>>> FC> https://github.com/apache/syncope/commit/cb42911816b5006dbc720de1dc2d83946c9376bc
>>> FC> [2]
>>> FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java#L67
>>> FC> [3]
>>> FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L99

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Posted by Andriy Redko <dr...@gmail.com>.
Hi Francesco,

I was able to reproduce the problem, there is an understanding what is going on but 
not yet clear how to fix it. Essentially, the read() method in question is mapped to 
the same annotated method 2 times. Previously, this case was not caught, ending up
with 2 resource operation infos, but with the CXF-7670 it does, hereby ProcessingException 
is being raised. It seems like it is too late to have it fixed in 3.2.3 though ... :(

Best Regards,
    Andriy Redko


FC> On 20/03/2018 16:54, Andriy Redko wrote:
>> Hi Francesco,

>> Sorry, haven't had a time to look closely on the issue yet, but it could be related to
>> https://github.com/apache/cxf/pull/388/files I think. Would you be able to verify if
>> the regression has been introduced in there? Thank you.

FC> Hi Andriy,
FC> thanks for your reply.

FC> I have grabbed

FC> rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java

FC> before commit

FC> 39627271ef7cc88609cc9c028b03ea4298b830cc

FC> and put in Syncope sources: I confirm all works as expected.

FC> FYI I've committed such (hopefully temporary) change to Syncope, waiting 
FC> for the actual fix to come:

FC> https://github.com/apache/syncope/commit/3fa2a5aaa7428a90611eb80006033cb1f6a5aca8

FC> Regards.

>> FC> Hi all,
>> FC> I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now I
>> FC> start getting exceptions as

>> FC> javax.ws.rs.ProcessingException: Method
>> FC> org.apache.syncope.common.rest.api.service.AnyObjectService.read is not
>> FC> a valid resource method

>> FC> where it seems that the given method [2] is not considered even though
>> FC> it is overriding [3], which is properly annotated.

>> FC> This works fine with 3.2.2 (and 3.1.15 on another branch).

>> FC> Any thought?
>> FC> Regards.

>> FC> [1]
>> FC> https://github.com/apache/syncope/commit/cb42911816b5006dbc720de1dc2d83946c9376bc
>> FC> [2]
>> FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java#L67
>> FC> [3]
>> FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L99



Re: Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Posted by Francesco Chicchiriccò <il...@apache.org>.
On 20/03/2018 16:54, Andriy Redko wrote:
> Hi Francesco,
>
> Sorry, haven't had a time to look closely on the issue yet, but it could be related to
> https://github.com/apache/cxf/pull/388/files I think. Would you be able to verify if
> the regression has been introduced in there? Thank you.

Hi Andriy,
thanks for your reply.

I have grabbed

rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/ResourceUtils.java

before commit

39627271ef7cc88609cc9c028b03ea4298b830cc

and put in Syncope sources: I confirm all works as expected.

FYI I've committed such (hopefully temporary) change to Syncope, waiting 
for the actual fix to come:

https://github.com/apache/syncope/commit/3fa2a5aaa7428a90611eb80006033cb1f6a5aca8

Regards.

> FC> Hi all,
> FC> I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now I
> FC> start getting exceptions as
>
> FC> javax.ws.rs.ProcessingException: Method
> FC> org.apache.syncope.common.rest.api.service.AnyObjectService.read is not
> FC> a valid resource method
>
> FC> where it seems that the given method [2] is not considered even though
> FC> it is overriding [3], which is properly annotated.
>
> FC> This works fine with 3.2.2 (and 3.1.15 on another branch).
>
> FC> Any thought?
> FC> Regards.
>
> FC> [1]
> FC> https://github.com/apache/syncope/commit/cb42911816b5006dbc720de1dc2d83946c9376bc
> FC> [2]
> FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java#L67
> FC> [3]
> FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L99

-- 
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/


Re: Problems with CXF 3.2.3 and method override in JAX-RS interfaces?

Posted by Andriy Redko <dr...@gmail.com>.
Hi Francesco,

Sorry, haven't had a time to look closely on the issue yet, but it could be related to 
https://github.com/apache/cxf/pull/388/files I think. Would you be able to verify if
the regression has been introduced in there? Thank you.

Best Regards,
    Andriy Redko

FC> Hi all,
FC> I've just upgraded the Syncope master branch to CXF 3.2.3 [1] and now I 
FC> start getting exceptions as

FC> javax.ws.rs.ProcessingException: Method 
FC> org.apache.syncope.common.rest.api.service.AnyObjectService.read is not 
FC> a valid resource method

FC> where it seems that the given method [2] is not considered even though 
FC> it is overriding [3], which is properly annotated.

FC> This works fine with 3.2.2 (and 3.1.15 on another branch).

FC> Any thought?
FC> Regards.

FC> [1] 
FC> https://github.com/apache/syncope/commit/cb42911816b5006dbc720de1dc2d83946c9376bc
FC> [2] 
FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyObjectService.java#L67
FC> [3] 
FC> https://github.com/apache/syncope/blob/master/common/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/AnyService.java#L99