Uploaded image for project: 'SwitchYard'
  1. SwitchYard
  2. SWITCHYARD-2348

HttpGatewayServlet causes ClassCastException because it can process only headers of type List<String>

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0
    • Component/s: component-http
    • Labels:
      None

      Description

      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

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mageshbk Magesh Bojan
                Reporter:
                mbasovni Martin Basovnik
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: