You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Sergey Beryozkin (JIRA)" <ji...@apache.org> on 2010/03/16 12:41:27 UTC

[jira] Resolved: (CXF-2715) JAXRSOutInterceptor throws ClassCastException with ContentTypeOutInterceptor

     [ https://issues.apache.org/jira/browse/CXF-2715?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergey Beryozkin resolved CXF-2715.
-----------------------------------

       Resolution: Fixed
    Fix Version/s: 2.3
                   2.2.7

It's already been fixed on 2.2.7-SNAPSHOT, I think Dan might've fixed it
thanks

> JAXRSOutInterceptor throws ClassCastException with ContentTypeOutInterceptor
> ----------------------------------------------------------------------------
>
>                 Key: CXF-2715
>                 URL: https://issues.apache.org/jira/browse/CXF-2715
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.2.6
>         Environment: Windows XP SP3
> jdk1.5.0_15
> Tomcat 5.5
> Spring 2.5.6
>            Reporter: Uttam Phalnikar
>             Fix For: 2.2.7, 2.3
>
>
> In my spring xml If I use ContentTypeOutInterceptor with following syntax
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> 	<jaxrs:server ...>
> 		...
> 		<jaxrs:inInterceptors>
> 			<bean class="org.apache.cxf.binding.http.interceptor.ContentTypeOutInterceptor"/>
> 		</jaxrs:inInterceptors>
> 		...
> 	</jaxrs:server
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>>
> Then that results into ClassCastException. The Exception is thrown by following code from serializeMessage method of JAXRSOutInterceptor.java
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>
>         MultivaluedMap<String, Object> responseHeaders = 
>             (MultivaluedMap)message.get(Message.PROTOCOL_HEADERS);
> <<<<<<<<<<<<<<<<<<<<<<<<<<<<
> It seems the ContentTypeOutInterceptor uses HashMap object to store Message.PROTOCOL_HEADERS value, but JAXRSOutInterceptor expects MultivaluedMap.
> My feeling is we should fix ContentTypeOutInterceptor. But as I am new to CXF, I am filing a bug.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.