Details
Description
I have a very simple setup of Camel (standalone).
My route is as follows:
public class Application { public static void main(String... args) throws Exception { Main main = new Main(); main.addRouteBuilder(new RouteBuilder() { @Override public void configure() throws Exception { restConfiguration().port(8080); rest("/pi") .get() .route() .setExchangePattern(ExchangePattern.InOut) .to("https4://api.pi.delivery/v1/pi?bridgeEndpoint=true"); } }); main.run(); } }
Call the endpoint with:
curl "http://localhost:8080/pi?start=0&numberOfDigits=10"
When using camel-undertow for consumer and camel-http4 for producer, I get a NullPointerException.
java.lang.NullPointerException: null at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:141) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.io.AsyncSenderImpl.send(AsyncSenderImpl.java:285) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at org.apache.camel.component.undertow.UndertowConsumer.handleRequest(UndertowConsumer.java:142) ~[camel-undertow-2.21.0.jar:2.21.0] at io.undertow.server.Connectors.executeRootHandler(Connectors.java:336) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830) ~[undertow-core-1.4.23.Final.jar:1.4.23.Final] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[na:1.8.0_102] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[na:1.8.0_102] at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_102]
However, if I switch out the camel-undertow dependency with camel-jetty, the above route configuration works just fine.