cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hendy Irawan (JIRA)" <j...@apache.org>
Subject [jira] Created: (CXF-2345) Returning AOP/CGLIB proxy as Subresource throws Fault "object is not an instance of declaring class"
Date Fri, 17 Jul 2009 01:17:14 GMT
Returning AOP/CGLIB proxy as Subresource throws Fault "object is not an instance of declaring
class"
----------------------------------------------------------------------------------------------------

                 Key: CXF-2345
                 URL: https://issues.apache.org/jira/browse/CXF-2345
             Project: CXF
          Issue Type: Bug
          Components: REST
    Affects Versions: 2.2.2
            Reporter: Hendy Irawan


Test case:

RootResource.java :

public class RootResource {

  @Path("subresource")
  public SubResource getSubResource();

}

Then the AOP proxied SubResource:

@RolesAllowed({"ROLE_USER"}) // activate Spring Security global method annotations
public class SubResource {
}

Getting the /subresource will throw exception:

org.apache.cxf.interceptor.Fault: object is not an instance of declaring class while invoking

Workaround: Make SubResource implement an interface then on RootResource.getSubResource()
use interface as the return type is the interface, not the class

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message