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-5295) CXF's JAXBProvider ignores the generic type info while building the JAXBContext
Date Mon, 23 Sep 2013 16:20:03 GMT

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

Sergey Beryozkin commented on CXF-5295:
---------------------------------------

Right, I recall us discussing it. JAXB-based JAX-RS providers do not build contexts dynamically,
because it will complicate the implementation significantly. The key for retrieving such contexts
would have to contain both raw and generic classes, and I'm not even sure how it will look
like with the signature like the one in your example.
JacksonJsonProvider does not need JAXB contexts.


                
> CXF's JAXBProvider ignores the generic type info while building the JAXBContext
> -------------------------------------------------------------------------------
>
>                 Key: CXF-5295
>                 URL: https://issues.apache.org/jira/browse/CXF-5295
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: Raj Anand
>
> In org.apache.cxf.jaxrs.provider.JAXBElementProvider<T> in the method ,
>  
> protected void marshal(Object obj, Class<?> cls, Type genericType, 
>                            String enc, OutputStream os, MediaType mt,
>                            Annotation[] anns) throws Exception {} calls 
> createMarshaller(..)->getJAXBContext(objClazz, genericType). In the getJAXBContext()
method the getPackageContext(..) and getClassContext(..) simply ignores the genericType info
as a result of which the JAXBContext is incomplete resulting in exceptions like , class java.util.ArrayList
nor any of its super class is known to this context., info=javax.xml.bind.JAXBException

--
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