Hi Im trying to implement a http proxy using apache camel as a servlet on a tomcat.
Everythink worked fine when I used camel as standalone apllication: <http://camel.465427.n5.nabble.com/file/n5792551/Test.png> But if I try to do it as a servlet in a tomcat I'll get errors as soon as I start the tomcat... web.xml: <http://camel.465427.n5.nabble.com/file/n5792551/webXML.png> camel-config.xml: <http://camel.465427.n5.nabble.com/file/n5792551/camel-config.png> Error: 2017-01-15 14:23:29,104 [8000/api2/data/] ERROR DefaultErrorHandler - Failed delivery for (MessageId: ID-BobSheknowdas-51310-1484486605582-0-563 on ExchangeId: ID-BobSheknowdas-51310-1484486605582-0-564). Exhausted after delivery attempt: 1 caught: org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking http://localhost:8080/api2/data/ with statusCode: 405 Message History --------------------------------------------------------------------------------------------------------------------------------------- RouteId ProcessorId Processor Elapsed (ms) [loadBalancer ] [loadBalancer ] [http://localhost:8000/api2/data/ ] [ 1] [loadBalancer ] [to1 ] [http://localhost:8080/api2/data/?bridgeEndpoint=true ] [ 1] Exchange --------------------------------------------------------------------------------------------------------------------------------------- Exchange[ Id ID-BobSheknowdas-51310-1484486605582-0-564 ExchangePattern InOnly Headers {breadcrumbId=ID-BobSheknowdas-51310-1484486605582-0-563, CamelHttpResponseCode=404, CamelRedelivered=false, CamelRedeliveryCounter=0, Content-Language=en, Content-Length=1006, Content-Type=text/html;charset=utf-8, Date=Sun, 15 Jan 2017 13:23:28 GMT} BodyType org.apache.camel.converter.stream.InputStreamCache Body [Body is instance of org.apache.camel.StreamCache] ] Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- org.apache.camel.component.http.HttpOperationFailedException: HTTP operation failed invoking http://localhost:8080/api2/data/ with statusCode: 405 at org.apache.camel.component.http.HttpProducer.populateHttpOperationFailedException(HttpProducer.java:228) at org.apache.camel.component.http.HttpProducer.process(HttpProducer.java:156) at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61) at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:110) at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:398) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:105) at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:87) at org.apache.camel.impl.DefaultScheduledPollConsumer.poll(DefaultScheduledPollConsumer.java:64) at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:187) at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:114) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) -- View this message in context: http://camel.465427.n5.nabble.com/Apache-Camel-Servlet-HTTP-Proxy-tp5792551.html Sent from the Camel - Users mailing list archive at Nabble.com.