cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Freeman Fang (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5189) Java transient modifier is ignored by JAXB databinding
Date Fri, 06 Sep 2013 07:24:52 GMT

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

Freeman Fang commented on CXF-5189:
-----------------------------------

Ah, sorry I miss your previous comment, will take a close look later on.

Freeman
                
> Java transient modifier is ignored by JAXB databinding
> ------------------------------------------------------
>
>                 Key: CXF-5189
>                 URL: https://issues.apache.org/jira/browse/CXF-5189
>             Project: CXF
>          Issue Type: Bug
>          Components: JAXB Databinding
>    Affects Versions: 2.7.6
>            Reporter: Etienne Massip
>            Assignee: Freeman Fang
>             Fix For: 3.0.0, 2.6.10, 2.7.7
>
>
> Method org.apache.cxf.jaxb.JAXBContextInitializer#isFieldAccepted ignores transient field
modifier and returns true.
> I hit this issue because of EclipseLink's [static weaving|http://wiki.eclipse.org/EclipseLink/UserGuide/JPA/Advanced_JPA_Development/Performance/Weaving/Static_Weaving#Table_19-16]
which generates such field on model, causing CXF to throw later a ServiceConstructionException.
> As stated in JAXB 2.1 spec ยง 8.9 "Property And Field":
> {quote}
> The following must be mapped (subject to the mapping constraints listed below):
> (&hellip;)
> * non static, non transient field of all the ancestors up to the stopClass (but
> excluding the stopClass itself); if annotated with @XmlAttribute,
> then static final field must be mapped (informally this maps to a fixed
> attribute but this is formally specified in the mapping tables below)
> {quote}
> I haven't dug further but MoXy (see http://www.hostettler.net/blog/2012/05/24/moxy) seems
to handle them (would make sense) and I guess that JAXB RI is as well.

--
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: http://www.atlassian.com/software/jira

Mime
View raw message