tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Zowalla (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (TOMEE-2565) JSONB Capabilities Broken in 7.1.1 Plume
Date Thu, 08 Aug 2019 12:29:00 GMT

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

Richard Zowalla edited comment on TOMEE-2565 at 8/8/19 12:28 PM:
-----------------------------------------------------------------

Hi [~cesarhernandezgt]

the major difference introduced in this commit is, that the *default values* differ, if no
user-specifed JSON provider is used. 

Before this commit, the default was: "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider","org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider"

After the changes in 4302acab62, the default values changed to: "org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider","org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider"

What I did:
 * checkout tomee-7.1.x branch
 * changed back the default values to the ones before 4302acab62 (TomEEJsonbProvider instead
of TomEEJohnzonProvider) in CxfRSService
 * build it: mvn clean install -DskipTests
 * update jsontest pom.xml to use: <tomee.version>7.1.2-SNAPSHOT</tomee.version>
 * build jsontest: mvn clean package 
 * the jsontest passes successfully.

A workaround for David would be to specify "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider"
via "openejb.jaxrs.jsonProviders" in the system properties  until a fix is available with
7.1.2

What I did to check this:
 * update jsontest pom.xml to use: <tomee.version>7.1.1</tomee.version>
 * update the junit test and set this property for the embedded container: p.setProperty("openejb.jaxrs.jsonProviders",
"org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider")
 * build jsontest: mvn clean package 
 * the jsontest passes successfully.

Ref: Diff-View on Github: [https://github.com/apache/tomee/commit/4302acab62bb64c2d77cce3a66b92ae7e9cff7c5]

@ [~cesarhernandezgt] I can prepare a PR, if you like.


was (Author: rzo1):
Hi [~cesarhernandezgt]

the major difference introduced in this commit is, that the *default values* differ, if no
user-specifed JSON provider is used. 

Before this commit, the default was: "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider","org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider"

After the changes in 4302acab62, the default values changed to: "org.apache.openejb.server.cxf.rs.johnzon.TomEEJohnzonProvider","org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonpProvider"

What I did:
 * checkout tomee-7.1.x branch
 * changed back the default values to the ones before 4302acab62 (TomEEJsonbProvider instead
of TomEEJohnzonProvider) in CxfRSService
 * build it: mvn clean install -DskipTests
 * update jsontest pom.xml to use: <tomee.version>7.1.2-SNAPSHOT</tomee.version>
 * build jsontest: mvn clean package 
 * the jsontest passes successfully.

A workaround for David would be to specify "org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider"
via "openejb.jaxrs.jsonProviders" in the system properties  until a fix is available with
7.1.2

What I did to check this:
 * update jsontest pom.xml to use: <tomee.version>7.1.1</tomee.version>
 * update the junit test and set this property for the embedded container: p.setProperty("openejb.jaxrs.jsonProviders",
"org.apache.openejb.server.cxf.rs.johnzon.TomEEJsonbProvider")
 * build jsontest: mvn clean package 
 * the jsontest passes successfully.

Ref: Diff-View on Github: [https://github.com/apache/tomee/commit/4302acab62bb64c2d77cce3a66b92ae7e9cff7c5]

 

> JSONB Capabilities Broken in 7.1.1 Plume
> ----------------------------------------
>
>                 Key: TOMEE-2565
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2565
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 7.1.1
>            Reporter: David Gannon
>            Priority: Major
>         Attachments: image-2019-08-06-20-26-50-587.png, image-2019-08-06-20-28-15-535.png,
tomeejson711.zip
>
>
> We have an existing app that has a REST client that utilizes various JSON-B classes and
annotations, such as javax.json.bind.JsonbConfig, javax.json.bind.config.PropertyNamingStrategy,

> javax.json.bind.config.PropertyVisibilityStrategy and
> javax.json.bind.annotation.JsonbTypeAdapter annotation.  We have been using 
> them in some REST clients running on 7.1.0 Plume and they work just fine. 
> But on 7.1.1 with identical server configs, all of the JSONB configuration 
> and the annotated fields seem to be ignored. 
> In addition, under 7.1.0, the provider has a built-in mappings for converting java.time.LocalDate
and java.time.LocalDateTime that do not seem to be present in 7.1.1. Under 7.1.0, the implementation
converts them to and from ISO format whereas 7.1.1 produces json as though it used the "toString"
method.
> I am attaching a small project that reproduces the problems.  As supplied, the project
will use tomee 7.1.0. Simply run "mvn clean package". Then, to see the issue in 7.1.1, change
the property "tomee.version" to 7.1.1 and run "mvn clean package".



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)

Mime
View raw message