cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shashank Rachamalla <shashank.rachama...@hexagrid.com>
Subject Accessing MessageContext when spring AOP is enabled
Date Fri, 13 May 2011 10:01:05 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message