Uploaded image for project: 'FUSE Mediation Router'
  1. FUSE Mediation Router
  2. MR-318

Mixing jetty/http in a route screws up the URI used by HttpClient

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 2.3.0-fuse-01-00
    • 2.2.0-fuse-01-00
    • None
    • None

      The attached test (apply on camel trunk) shows an issue when you mix Jetty and http in the same route. If you run the test and then check the target/camel-itest-test.log you'll see the following exception occurs:

      Exhausted after delivery attempt: 1 caught: java.lang.IllegalArgumentException: host parameter is null
      java.lang.IllegalArgumentException: host parameter is null
      at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:206)
      at org.apache.commons.httpclient.HttpConnection.<init>(HttpConnection.java:155)
      at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionWithReference.<init>(MultiThreadedHttpConnectionManager.java:1145)
      at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$ConnectionPool.createConnection(MultiThreadedHttpConnectionManager.java:762)
      at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.doGetConnection(MultiThreadedHttpConnectionManager.java:476)
      at org.apache.commons.httpclient.MultiThreadedHttpConnectionManager.getConnectionWithTimeout(MultiThreadedHttpConnectionManager.java:416)
      at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:153)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
      at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
      at org.apache.camel.component.http.HttpProducer.executeMethod(HttpProducer.java:164)
      at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:78)
      at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:97)
      at org.apache.camel.processor.SendProcessor$1.doInProducer(SendProcessor.java:95)
      at org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:173)

      It's possible to work around this by specifically setting the HTTP_URI/HTTP_QUERY headers. Also I checked the camel-http HttpGetTest and that works fine.

            willem.jiang Willem Jiang (Inactive)
            stlewis_2 Stan Lewis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: