Return-Path: X-Original-To: apmail-cxf-users-archive@www.apache.org Delivered-To: apmail-cxf-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 913804C90 for ; Fri, 13 May 2011 10:01:35 +0000 (UTC) Received: (qmail 34263 invoked by uid 500); 13 May 2011 10:01:34 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 34225 invoked by uid 500); 13 May 2011 10:01:34 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 34217 invoked by uid 99); 13 May 2011 10:01:34 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 10:01:34 +0000 X-ASF-Spam-Status: No, hits=2.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_SOFTFAIL X-Spam-Check-By: apache.org Received-SPF: softfail (nike.apache.org: transitioning domain of shashank.rachamalla@hexagrid.com does not designate 209.85.213.169 as permitted sender) Received: from [209.85.213.169] (HELO mail-yx0-f169.google.com) (209.85.213.169) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 May 2011 10:01:27 +0000 Received: by yxt33 with SMTP id 33so1024796yxt.0 for ; Fri, 13 May 2011 03:01:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.150.200.3 with SMTP id x3mr1282007ybf.325.1305280865466; Fri, 13 May 2011 03:01:05 -0700 (PDT) Received: by 10.146.84.5 with HTTP; Fri, 13 May 2011 03:01:05 -0700 (PDT) Date: Fri, 13 May 2011 15:31:05 +0530 Message-ID: Subject: Accessing MessageContext when spring AOP is enabled From: Shashank Rachamalla To: users@cxf.apache.org Content-Type: multipart/alternative; boundary=000e0cd3489e517a3804a32562f4 X-Virus-Checked: Checked by ClamAV on apache.org --000e0cd3489e517a3804a32562f4 Content-Type: text/plain; charset=ISO-8859-1 Hi I have been trying to get a reference to MessageContext through @Context annotation. However, when spring AOP is enabled I see the following exception being thrown. any clues ? Caused by: java.lang.IllegalArgumentException: Can not set org.apache.cxf.jaxrs.ext.MessageContext field com.hexagrid.vxappstore.webservice.impl.AppstoreApplianceWebServiceImpl.mcto $Proxy87 at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:146) at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:150) at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:37) at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:57) at java.lang.reflect.Field.set(Field.java:657) at org.apache.cxf.jaxrs.utils.InjectionUtils$1.run(InjectionUtils.java:162) at java.security.AccessController.doPrivileged(Native Method) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectFieldValue(InjectionUtils.java:158) at org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxiesAndApplication(InjectionUtils.java:815) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.injectContexts(JAXRSServerFactoryBean.java:324) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.updateClassResourceProviders(JAXRSServerFactoryBean.java:350) at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:120) ... 44 more I tried using a setter with @Context annotation but no luck. -- Regards, Shashank Rachamalla --000e0cd3489e517a3804a32562f4--