You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Tommy Odom (JIRA)" <ji...@apache.org> on 2009/10/09 21:33:31 UTC
[jira] Created: (CXF-2464) ClassCastException in
JAXRSOutInterceptor.serializeMessage
ClassCastException in JAXRSOutInterceptor.serializeMessage
----------------------------------------------------------
Key: CXF-2464
URL: https://issues.apache.org/jira/browse/CXF-2464
Project: CXF
Issue Type: Bug
Components: REST
Affects Versions: 2.2.2
Reporter: Tommy Odom
The following line in JAXRSOutInterceptor.serializeMessage causes a ClassCastException if the headers are not of type MultivaluedMap.
MultivaluedMap<String, Object> responseHeaders =
(MultivaluedMap)message.get(Message.PROTOCOL_HEADERS);
We have an existing CXF out interceptor that we configure on the CXF bus which works with both SOAP and REST calls so when we add the protocol headers we use a standard HashMap. This worked fine in CXF 2.2 but when we tried upgrading to CXF 2.2.2 our REST services started failing. A few lines above that the code retrieves the headers and refers to them as a standard Map interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (CXF-2464) ClassCastException in
JAXRSOutInterceptor.serializeMessage
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12764176#action_12764176 ]
Sergey Beryozkin commented on CXF-2464:
---------------------------------------
it's unfortunate...please use new MetadataMap<String, Object> as a workaround, it implements Map<String, List<Object>> so will work in JAXWS only case
> ClassCastException in JAXRSOutInterceptor.serializeMessage
> ----------------------------------------------------------
>
> Key: CXF-2464
> URL: https://issues.apache.org/jira/browse/CXF-2464
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.2.2
> Reporter: Tommy Odom
>
> The following line in JAXRSOutInterceptor.serializeMessage causes a ClassCastException if the headers are not of type MultivaluedMap.
> MultivaluedMap<String, Object> responseHeaders =
> (MultivaluedMap)message.get(Message.PROTOCOL_HEADERS);
> We have an existing CXF out interceptor that we configure on the CXF bus which works with both SOAP and REST calls so when we add the protocol headers we use a standard HashMap. This worked fine in CXF 2.2 but when we tried upgrading to CXF 2.2.2 our REST services started failing. A few lines above that the code retrieves the headers and refers to them as a standard Map interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (CXF-2464) ClassCastException in
JAXRSOutInterceptor.serializeMessage
Posted by "Sergey Beryozkin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CXF-2464?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sergey Beryozkin resolved CXF-2464.
-----------------------------------
Resolution: Fixed
Fix Version/s: 2.2.3
Please try 2.2.3, it has the proper code in. If you have to stay with 2.2.2 then please you new MetadataMap<String, String> in your custom interceptor
> ClassCastException in JAXRSOutInterceptor.serializeMessage
> ----------------------------------------------------------
>
> Key: CXF-2464
> URL: https://issues.apache.org/jira/browse/CXF-2464
> Project: CXF
> Issue Type: Bug
> Components: REST
> Affects Versions: 2.2.2
> Reporter: Tommy Odom
> Fix For: 2.2.3
>
>
> The following line in JAXRSOutInterceptor.serializeMessage causes a ClassCastException if the headers are not of type MultivaluedMap.
> MultivaluedMap<String, Object> responseHeaders =
> (MultivaluedMap)message.get(Message.PROTOCOL_HEADERS);
> We have an existing CXF out interceptor that we configure on the CXF bus which works with both SOAP and REST calls so when we add the protocol headers we use a standard HashMap. This worked fine in CXF 2.2 but when we tried upgrading to CXF 2.2.2 our REST services started failing. A few lines above that the code retrieves the headers and refers to them as a standard Map interface.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.