And what version of Camel do you use? On Wed, Oct 1, 2014 at 3:06 PM, junaid <mjunaidmuzam...@gmail.com> wrote: > Attached below is the entire stack trace. > > > Oct 01, 2014 1:19:08 PM org.restlet.ext.httpclient.internal.HttpMethodCall > sendRequest > WARNING: An error occurred during the communication with the remote HTTP > server. > org.apache.http.conn.HttpHostConnectException: Connection to > http://192.168.21.26:8080 refused > at > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:158) > at > org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:150) > at > org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121) > at > org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:575) > at > org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425) > at > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820) > at > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754) > at > org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:732) > at > org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:336) > at > org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:360) > at > org.restlet.engine.adapter.ClientAdapter.commit(ClientAdapter.java:90) > at > org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:112) > at org.restlet.Client.handle(Client.java:180) > at org.restlet.Restlet.handle(Restlet.java:351) > at org.restlet.Restlet.handle(Restlet.java:364) > at > org.apache.camel.component.restlet.RestletProducer.process(RestletProducer.java:88) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) > at > org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73) > at > org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:378) > at > org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:346) > at > org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:242) > at > org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:346) > at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201) > at > org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128) > at > org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115) > at > org.apache.camel.impl.DefaultProducerTemplate.request(DefaultProducerTemplate.java:293) > at > constellixrestnotifier.processors.HttpRestProcessor.sendRestRequest(HttpRestProcessor.java:45) > at > constellixrestnotifier.processors.HttpRestProcessor.process(HttpRestProcessor.java:35) > at > org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63) > 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.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468) > at > org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) > at > org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) > at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101) > at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093) > at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > Caused by: java.net.ConnectException: Connection refused > at java.net.PlainSocketImpl.socketConnect(Native Method) > at > java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:339) > at > java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:200) > at > java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:182) > at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392) > at java.net.Socket.connect(Socket.java:579) > at > org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:123) > at > org.apache.http.conn.scheme.PlainSocketFactory.connectSocket(PlainSocketFactory.java:179) > at > org.apache.http.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:62) > at > org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148) > ... 46 more > > Oct 01, 2014 1:19:08 PM org.restlet.engine.adapter.ClientAdapter$1 handle > WARNING: Unexpected error or exception inside the user call back > java.lang.NullPointerException > at > org.restlet.ext.httpclient.internal.HttpMethodCall.getStatusCode(HttpMethodCall.java:271) > at > org.restlet.engine.adapter.ClientAdapter$1.handle(ClientAdapter.java:93) > at > org.restlet.ext.httpclient.internal.HttpMethodCall.sendRequest(HttpMethodCall.java:368) > at > org.restlet.engine.adapter.ClientAdapter.commit(ClientAdapter.java:90) > at > org.restlet.engine.adapter.HttpClientHelper.handle(HttpClientHelper.java:112) > at org.restlet.Client.handle(Client.java:180) > at org.restlet.Restlet.handle(Restlet.java:351) > at org.restlet.Restlet.handle(Restlet.java:364) > at > org.apache.camel.component.restlet.RestletProducer.process(RestletProducer.java:88) > at > org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:191) > at > org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:73) > at > org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:378) > at > org.apache.camel.impl.ProducerCache$2.doInProducer(ProducerCache.java:346) > at > org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:242) > at > org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:346) > at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:201) > at > org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:128) > at > org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:115) > at > org.apache.camel.impl.DefaultProducerTemplate.request(DefaultProducerTemplate.java:293) > at > constellixrestnotifier.processors.HttpRestProcessor.sendRestRequest(HttpRestProcessor.java:45) > at > constellixrestnotifier.processors.HttpRestProcessor.process(HttpRestProcessor.java:35) > at > org.apache.camel.processor.DelegateSyncProcessor.process(DelegateSyncProcessor.java:63) > 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.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:103) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:562) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:500) > at > org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:468) > at > org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325) > at > org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263) > at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1101) > at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1093) > at > org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:990) > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) > at java.lang.Thread.run(Thread.java:745) > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > Claus Ibsen-2 wrote >> Hi >> >> What version of Camel do you use? And can you print the entire >> stacktrace, assuming there is more than just a WARN log. >> >> On Wed, Oct 1, 2014 at 1:47 PM, junaid < > >> mjunaidmuzammil@ > >> > wrote: >>> Hello, >>> >>> I am using Camel Restlet component for connecting an HTTP Server. I am >>> sending messages to the HTTP server using the producer Template inside a >>> camel Processor. >>> >>> Exchange ex = producerTemplate.request(url, body, headers); >>> >>> Under normal flow operation (i.e. when the web server is available), >>> everything works fine. I am able to get the response as well as exception >>> in >>> case of errors like 404 using ex.getException(). >>> >>> The problem arise when the web server gets down. In this case, none of >>> the >>> exception gets caught in the exchange but the following log is printed. >>> >>> WARNING: An error occurred during the communication with the remote HTTP >>> server. >>> org.apache.http.conn.HttpHostConnectException: Connection to >>> http://192.168.21.26:8080 refused >>> ............. >>> >>> >>> How can I handle this particular exception through Apache Camel? >>> >>> >>> >>> -- >>> View this message in context: >>> http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279.html >>> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> >> >> -- >> Claus Ibsen >> ----------------- >> Red Hat, Inc. >> Email: > >> cibsen@ > >> Twitter: davsclaus >> Blog: http://davsclaus.com >> Author of Camel in Action: http://www.manning.com/ibsen >> hawtio: http://hawt.io/ >> fabric8: http://fabric8.io/ > > > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Catching-HttpHostConnectException-from-Camel-Restlet-component-tp5757279p5757282.html > Sent from the Camel - Users mailing list archive at Nabble.com.
-- Claus Ibsen ----------------- Red Hat, Inc. Email: cib...@redhat.com Twitter: davsclaus Blog: http://davsclaus.com Author of Camel in Action: http://www.manning.com/ibsen hawtio: http://hawt.io/ fabric8: http://fabric8.io/