cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergey Beryozkin (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-6746) CXF 3.1.4 doesn't work with JacksonJsonProvider 2.6.4
Date Wed, 13 Jan 2016 15:02:39 GMT

    [ https://issues.apache.org/jira/browse/CXF-6746?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15096303#comment-15096303
] 

Sergey Beryozkin commented on CXF-6746:
---------------------------------------

I've updated the Jackson version, see
http://git-wip-us.apache.org/repos/asf/cxf/commit/8f98be8e

and CXF tests run OK.

What is likely happening is that you have some beans that both Jettison and Jackson can handle,
example, it is XMLRootElement annotated beans. CXF 3.1.x is more compliant in the way it selects
providers. Jackson is a wildcard provider, it has wildcard Produces/Consumes, while the default
CXF Jettision based provider is more specific in its Produces/Consumes - hence when both providers
are loaded and both can handle the given data Jettison will win.

Exclude Jettison and it will work as expected, if not - please create a Maven based test case


> CXF 3.1.4 doesn't work with JacksonJsonProvider 2.6.4
> -----------------------------------------------------
>
>                 Key: CXF-6746
>                 URL: https://issues.apache.org/jira/browse/CXF-6746
>             Project: CXF
>          Issue Type: Bug
>          Components: Integration, JAX-RS
>    Affects Versions: 3.1.4
>         Environment: java version "1.8.0_45"
> Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
> Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)
> 		<version.cxf>3.1.4</version.cxf>
> 		<dependency>
> 			<groupId>com.fasterxml.jackson.jaxrs</groupId>
> 			<artifactId>jackson-jaxrs-json-provider</artifactId>
> 			<version>2.6.4</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-rt-frontend-jaxws</artifactId>
> 			<version>${version.cxf}</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-rt-frontend-jaxrs</artifactId>
> 			<version>${version.cxf}</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-rt-transports-http</artifactId>
> 			<version>${version.cxf}</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-rt-transports-http-jetty</artifactId>
> 			<version>${version.cxf}</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-rt-rs-extension-providers</artifactId>
> 			<version>${version.cxf}</version>
> 		</dependency>
> 		<dependency>
> 			<groupId>org.apache.cxf</groupId>
> 			<artifactId>cxf-rt-rs-client</artifactId>
> 			<version>${version.cxf}</version>
> 		</dependency>
>            Reporter: Artiom
>
> I observe some poblem during using JacksonJsonProvider.
> Firstly we have CXF v. 2.7.15 and using default Jettison provider.
> From some reasons (Jettison convert POJO String field to "json-number" if it's possible,
http://stackoverflow.com/questions/22379082/jettison-string-returned-as-integer-when-marshalling)
we decide change provider on JacksonJsonProvider.
> I change Jettison on JacksonJsonProvider v. 2.6.4 and observe some problem, application
frozen after some time if we active use new provider.
> Because CXF v. 2.7.15 is too older, we decide change CXF version on latest 3.1.4
> After change version of CXF I observe that CXF use default Jettison proveder insted of
JacksonJsonProvider despite the fact that in I configurate CXF for using JacksonJsonProvider.
If I only change version of JacksonJsonProvider on 2.0.0 all works fine.
> Result:
> *CXF v.2.7.15 with Jackson v.2.6.4 work, but have some bug (don't descride them because
v.2.7.15 is too old).*
> *CXF v.3.1.4 with Jackson v.2.6.4 doesn't work, CXF use default Jettison.*
> *CXF v.3.1.4 with Jackson v.2.0.0 work fine.*
> If you need some additional information please write here, thank you.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message