You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by tonywestonuk <to...@totspics.com> on 2016/04/17 10:23:15 UTC

7.0.0-M3 Johnzon bug

I have been migrating an app from 1.7.4, to 7.0.0-M3.

Some of the rest DTO's have @XmlAccessorType(XmlAccessType.FIELD)
, where the information is pulled directly from a public field, rather than
a getter method.  It doesn't work in Tomee 7.0.0-M3, the json is blank.

The work around is just to add getters/setters, so isn't really a major
problem.  However, it does appear that XmlAccessorType annotation is not
being considered... 



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/7-0-0-M3-Johnzon-bug-tp4678163.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: 7.0.0-M3 Johnzon bug

Posted by tonywestonuk <to...@totspics.com>.
ok, Fair enough! :-)



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/7-0-0-M3-Johnzon-bug-tp4678163p4678171.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: 7.0.0-M3 Johnzon bug

Posted by Romain Manni-Bucau <rm...@gmail.com>.
2016-04-18 10:31 GMT+02:00 tonywestonuk <to...@totspics.com>:

> Ok...my app is all up and running fine now.....  Just one thing concerning:
>
> >>yes, tomee 7 uses johnzon and not jettison anymore and jaxb is fully
> ignored by design (to prepare to jsonb)
>
> By doing this, are you going against the Java EE spec, or the spirit of the
> spec at the very least.  These annotations describe how the bean should be
> interogated by the thing that converts it to XML,  to ignore it by design,
> because the output is instead JSON, doesn't sit right with me...
>
>
>
The JSONB spec will not use JAXB annotations (if you check jettison never
matched JSON expectations cause of that - abusive escaping, wrapping by
default etc...).JSONB will be super close to johnzon default.


>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/7-0-0-M3-Johnzon-bug-tp4678163p4678169.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>

Re: 7.0.0-M3 Johnzon bug

Posted by tonywestonuk <to...@totspics.com>.
Ok...my app is all up and running fine now.....  Just one thing concerning:

>>yes, tomee 7 uses johnzon and not jettison anymore and jaxb is fully 
ignored by design (to prepare to jsonb)

By doing this, are you going against the Java EE spec, or the spirit of the
spec at the very least.  These annotations describe how the bean should be
interogated by the thing that converts it to XML,  to ignore it by design,
because the output is instead JSON, doesn't sit right with me... 





--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/7-0-0-M3-Johnzon-bug-tp4678163p4678169.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: 7.0.0-M3 Johnzon bug

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

yes, tomee 7 uses johnzon and not jettison anymore and jaxb is fully
ignored by design (to prepare to jsonb). You can configure it to use field
access mode which would not require getters/setters


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2016-04-17 10:23 GMT+02:00 tonywestonuk <to...@totspics.com>:

> I have been migrating an app from 1.7.4, to 7.0.0-M3.
>
> Some of the rest DTO's have @XmlAccessorType(XmlAccessType.FIELD)
> , where the information is pulled directly from a public field, rather than
> a getter method.  It doesn't work in Tomee 7.0.0-M3, the json is blank.
>
> The work around is just to add getters/setters, so isn't really a major
> problem.  However, it does appear that XmlAccessorType annotation is not
> being considered...
>
>
>
> --
> View this message in context:
> http://tomee-openejb.979440.n4.nabble.com/7-0-0-M3-Johnzon-bug-tp4678163.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>