You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergiusz Kierat (Created) (JIRA)" <ji...@apache.org> on 2012/03/05 11:05:57 UTC
[jira] [Created] (CXF-4155) Fault "object is not an instance of
declaring class" is related to AOP/CGLIB
Fault "object is not an instance of declaring class" is related to AOP/CGLIB
----------------------------------------------------------------------------
Key: CXF-4155
URL: https://issues.apache.org/jira/browse/CXF-4155
Project: CXF
Issue Type: Bug
Components: JAX-RS
Affects Versions: 2.5.2, 2.4
Reporter: Sergiusz Kierat
Fix For: 2.4.7
Attachments: cxf_bug.tar.gz
The attached app works when the annotation Secured is turned off, otherwise fails.
In my opinion, there is the issue during proxying mechanism in Spring Security.
Try it out :
* run : _mvn clean install jetty:run_
* after running see :
** http://localhost:8080/cxf/rest/?_wadl&_type=xml
** http://localhost:8080/cxf/rest/name - PASS
** http://localhost:8080/cxf/rest/dateTime - FAIL
Known workaround : add declaration method *getDateTime()* to _RestService_
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4155) Fault "object is not an instance of
declaring class" is related to AOP/CGLIB
Posted by "Sergiusz Kierat (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223122#comment-13223122 ]
Sergiusz Kierat commented on CXF-4155:
--------------------------------------
@Sergey : Thanks for the nice hint. I have not seen it. I do not want to switch the entire application to CGLIB by *<aop:aspectj-autoproxy proxy-target-class="true"/>*. This is not an option, thus I have to use "the preferred solution". Thanks a lot.
> Fault "object is not an instance of declaring class" is related to AOP/CGLIB
> ----------------------------------------------------------------------------
>
> Key: CXF-4155
> URL: https://issues.apache.org/jira/browse/CXF-4155
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.4, 2.5.2
> Reporter: Sergiusz Kierat
> Assignee: Sergey Beryozkin
> Fix For: 2.4.7
>
> Attachments: cxf_bug.tar.gz
>
>
> The attached app works when the annotation Secured is turned off, otherwise fails.
> In my opinion, there is the issue during proxying mechanism in Spring Security.
> Try it out :
> * run : _mvn clean install jetty:run_
> * after running see :
> ** http://localhost:8080/cxf/rest/?_wadl&_type=xml
> ** http://localhost:8080/cxf/rest/name - PASS
> ** http://localhost:8080/cxf/rest/dateTime - FAIL
> Known workaround : add declaration method *getDateTime()* to _RestService_
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CXF-4155) Fault "object is not an instance of
declaring class" is related to AOP/CGLIB
Posted by "Sergey Beryozkin (Commented) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13223130#comment-13223130 ]
Sergey Beryozkin commented on CXF-4155:
---------------------------------------
Hi, you can also spread the methods across multiple interfaces if needed, but generally, the service methods are visible after the spring proxification when they are either coming from the interfaces or CGLIB-enhanced;
> Fault "object is not an instance of declaring class" is related to AOP/CGLIB
> ----------------------------------------------------------------------------
>
> Key: CXF-4155
> URL: https://issues.apache.org/jira/browse/CXF-4155
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.4, 2.5.2
> Reporter: Sergiusz Kierat
> Assignee: Sergey Beryozkin
> Fix For: 2.4.7
>
> Attachments: cxf_bug.tar.gz
>
>
> The attached app works when the annotation Secured is turned off, otherwise fails.
> In my opinion, there is the issue during proxying mechanism in Spring Security.
> Try it out :
> * run : _mvn clean install jetty:run_
> * after running see :
> ** http://localhost:8080/cxf/rest/?_wadl&_type=xml
> ** http://localhost:8080/cxf/rest/name - PASS
> ** http://localhost:8080/cxf/rest/dateTime - FAIL
> Known workaround : add declaration method *getDateTime()* to _RestService_
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CXF-4155) Fault "object is not an instance of
declaring class" is related to AOP/CGLIB
Posted by "Sergiusz Kierat (Updated) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergiusz Kierat updated CXF-4155:
---------------------------------
Attachment: cxf_bug.tar.gz
> Fault "object is not an instance of declaring class" is related to AOP/CGLIB
> ----------------------------------------------------------------------------
>
> Key: CXF-4155
> URL: https://issues.apache.org/jira/browse/CXF-4155
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.4, 2.5.2
> Reporter: Sergiusz Kierat
> Fix For: 2.4.7
>
> Attachments: cxf_bug.tar.gz
>
>
> The attached app works when the annotation Secured is turned off, otherwise fails.
> In my opinion, there is the issue during proxying mechanism in Spring Security.
> Try it out :
> * run : _mvn clean install jetty:run_
> * after running see :
> ** http://localhost:8080/cxf/rest/?_wadl&_type=xml
> ** http://localhost:8080/cxf/rest/name - PASS
> ** http://localhost:8080/cxf/rest/dateTime - FAIL
> Known workaround : add declaration method *getDateTime()* to _RestService_
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CXF-4155) Fault "object is not an instance of
declaring class" is related to AOP/CGLIB
Posted by "Sergey Beryozkin (Resolved) (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-4155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-4155.
-----------------------------------
Resolution: Not A Problem
Assignee: Sergey Beryozkin
> Known workaround : add declaration method getDateTime() to RestService
It is not a workaround but a preferred solution; however if it is not possible in the production then enabling the cglib mode fixes it, I've verified it locally;
http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-SpringAOP
You will need a spring aop and aspectj deps added to the project to confirm...
> Fault "object is not an instance of declaring class" is related to AOP/CGLIB
> ----------------------------------------------------------------------------
>
> Key: CXF-4155
> URL: https://issues.apache.org/jira/browse/CXF-4155
> Project: CXF
> Issue Type: Bug
> Components: JAX-RS
> Affects Versions: 2.4, 2.5.2
> Reporter: Sergiusz Kierat
> Assignee: Sergey Beryozkin
> Fix For: 2.4.7
>
> Attachments: cxf_bug.tar.gz
>
>
> The attached app works when the annotation Secured is turned off, otherwise fails.
> In my opinion, there is the issue during proxying mechanism in Spring Security.
> Try it out :
> * run : _mvn clean install jetty:run_
> * after running see :
> ** http://localhost:8080/cxf/rest/?_wadl&_type=xml
> ** http://localhost:8080/cxf/rest/name - PASS
> ** http://localhost:8080/cxf/rest/dateTime - FAIL
> Known workaround : add declaration method *getDateTime()* to _RestService_
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira