Custom ContextResolver is not picked up for marshal/unmarshal calls for application/json and application/xml media types. -------------------------------------------------------------------------------------------------------------------------
Key: CXF-2514 URL: https://issues.apache.org/jira/browse/CXF-2514 Project: CXF Issue Type: Bug Components: JAX-RS Affects Versions: 2.2.4 Environment: Windows, jdk1.5.0_06 Reporter: Chaitanya Choleti In the method org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.getJAXBContext(Class<?> type, Type genericType) ContextResolver<JAXBContext> resolver = mc.getResolver(ContextResolver.class, JAXBContext.class); getResolver(...) always returns null. This happens because in org.apache.cxf.jaxrs.utils.JAXRSUtils.createContextResolver(Type genericType, Message m) method there is a check (genericType instanceof ParameterizedType) in this case genericType is JAXBContext.class which is not an instance of ParameterizedType so the check fails and a null value is returned. Suggested Fix : Inject the context resolver directly in to AbstractJAXBProvider as it was done in an earlier version. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.