@Service
@Transactional
@Path("test")
public class ServiceImpl implements Service {
@Get
public void test(@Context MessageContext ctx) {
}
}
выдает 404
@Service
@Transactional
@Path("test")
public class ServiceImpl implements Service {
@Context MessageContext ctx;
@Get
public void test() {
}
}
так вылетает :
Caused by: java.lang.IllegalArgumentException: Can not set org.apache.cxf.jaxrs.ext.MessageContext field com.example.services.test.ServiceImpl.ctx to com.sun.proxy.$Proxy197
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:167)
at sun.reflect.UnsafeFieldAccessorImpl.throwSetIllegalArgumentException(UnsafeFieldAccessorImpl.java:171)
at sun.reflect.UnsafeFieldAccessorImpl.ensureObj(UnsafeFieldAccessorImpl.java:58)
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(UnsafeObjectFieldAccessorImpl.java:75)
at java.lang.reflect.Field.set(Field.java:764)
at org.apache.cxf.jaxrs.utils.InjectionUtils$1.run(InjectionUtils.java:228)
at java.security.AccessController.doPrivileged(Native Method)
at org.apache.cxf.jaxrs.utils.InjectionUtils.injectFieldValue(InjectionUtils.java:224)
at org.apache.cxf.jaxrs.utils.InjectionUtils.injectContextProxiesAndApplication(InjectionUtils.java:1103)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.injectContexts(JAXRSServerFactoryBean.java:405)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.updateClassResourceProviders(JAXRSServerFactoryBean.java:429)
at org.apache.cxf.jaxrs.JAXRSServerFactoryBean.create(JAXRSServerFactoryBean.java:162)
... 29 more
что я делаю не так?