cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "bc Wong (JIRA)" <>
Subject [jira] [Created] (CXF-5220) Json API client does not work with Jackson 2.2
Date Wed, 21 Aug 2013 06:32:51 GMT
bc Wong created CXF-5220:

             Summary: Json API client does not work with Jackson 2.2
                 Key: CXF-5220
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS
    Affects Versions: 2.5.11
            Reporter: bc Wong

JacksonJsonProvider in Jackson 2.2 changes the signature to:
 JacksonJsonProvider extends ProviderBase<JacksonJsonProvider, ObjectMapper, JsonEndpointConfig,

That means it'll never get picked as a candidate for a message reader, because {{ProviderFactory#handleMapper}}
has this:
Class<?> mapperClass =  ClassHelper.getRealClass(em.getProvider());
Type[] types = getGenericInterfaces(mapperClass);
for (Type t : types) {
    if (t instanceof ParameterizedType) {
        ParameterizedType pt = (ParameterizedType)t;
        Type[] args = pt.getActualTypeArguments();
        for (int i = 0; i < args.length; i++) {
            Type arg = args[i];
            if (arg instanceof TypeVariable) {         // <------ Always fail
                TypeVariable var = (TypeVariable)arg;
                Type[] bounds = var.getBounds();

And the symptom is that my API client (which has a dependency on Jackson 2.2.2) errors out
like this:
Caused by: javax.xml.bind.UnmarshalException: unexpected
element (uri:"", local:"items"). Expected elements are <{}cluster>,<{}clusterList>,<{}clusterRef>,<{}config>,<{}configList>,<{}healthCheck>,<{}parcel>,<{}role>,<{}roleConfigGroup>,<{}roleConfigGroupRef>,<{}roleTypeConfig>,<{}service>,<{}serviceConfig>,<{}serviceRef>
	at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.handleExceptionEnd(
	at org.apache.cxf.jaxrs.provider.AbstractJAXBProvider.handleJAXBException(
	at org.apache.cxf.jaxrs.provider.JSONProvider.readFrom(

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message