Issue with the ref endpoint

Solution Unverified - Updated -

Environment

  • Red Hat Fuse
    • 7.10.0

Issue

  • When an endpoint URI is configured using the http4 component and this http4 component is accessed using the "ref" component, the application throws below exception
java.lang.IllegalStateException: Connection pool shut down
at org.apache.http.util.Asserts.check(Asserts.java:34) ~[?:?]

Resolution

  • We have reported an issue with this behavior ENTESB-18471
  • The workaround for this issue is to hit the URI directly as shown below
<to uri="http4:{{host url}}"/>

Diagnostic Steps

Follow the below steps to reproduce the issue:
Step 1: Navigate to the attached code and compile using the mvn commands

$ mvn clean package

Step 2: Navigate to the bin directory of Fuse and start Fuse

$ ./fuse

Step 3: Install camel-http4 feature

karaf@root()> features:install camel-http4

Step 4: Deploy the compiled bundle in step 1

karaf@root()> bundle:install -s file:{Path to the jar file}/target/CamelRefEndpoint-1.0-SNAPSHOT.jar

Step 5: Hit the rest endpoint

$ curl -X GET "http://localhost:9090/sample/get3" -H "accept: application/json"

In the fuse logs, you can see the exception as mentioned in the description.

Attachments

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments