Bug 1146480 - HttpGatewayServlet causes ClassCastException because it can process only headers of type List<String>
Summary: HttpGatewayServlet causes ClassCastException because it can process only head...
Keywords:
Status: CLOSED DUPLICATE of bug 1138750
Alias: None
Product: JBoss Fuse Service Works 6
Classification: JBoss
Component: SwitchYard
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Keith Babo
QA Contact: Jiri Sedlacek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-09-25 10:22 UTC by Martin Basovník
Modified: 2016-12-01 00:55 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-30 18:16:17 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker SWITCHYARD-2348 0 Major Open HttpGatewayServlet causes ClassCastException because it can process only headers with List<String> value 2014-09-25 10:22:59 UTC

Description Martin Basovník 2014-09-25 10:22:58 UTC
HttpGatewayServlet causes ClassCastException because it can process only headers of type List<String>.

https://github.com/jboss-switchyard/components/blob/2.0.0.Alpha2/http/src/main/java/org/switchyard/component/http/HttpGatewayServlet.java#L166

Issue is connected with contextMapper. If we use regular expression in includes attribute with value ".*" it will add to HTTP response various types.

e.g. 
Following code appends header of type List<DefaultMessageHistory>
https://github.com/apache/camel/blob/camel-2.12.2/camel-core/src/main/java/org/apache/camel/processor/CamelInternalProcessor.java#L681
This will cause the following exception:

java.lang.ClassCastException: org.apache.camel.impl.DefaultMessageHistory cannot be cast to java.lang.String

Comment 1 kconner 2014-09-30 18:16:17 UTC

*** This bug has been marked as a duplicate of bug 1138750 ***


Note You need to log in before you can comment on or make changes to this bug.