Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.0.0
-
None
-
Unknown
Description
Try simple route like this:
from("timer:foo?period=5000&repeatCount=1")
.log(">>> ${body}").to("elasticsearch-rest://docker-cluster?operation=INDEX&indexName=twitter&hostAddresses=127.0.0.1:9200")
.to("mock:result");
and then observe exception in log:
08:59:19.181 [Camel (MyCamel) thread #1 - timer://foo] WARN o.a.c.component.timer.TimerConsumer - Error processing exchange. Exchange[ID-localhost-localdomain-1572422356875-0-1]. Caused by: [java.lang.NullPointerException - null]
java.lang.NullPointerException: null
at org.apache.camel.component.elasticsearch.converter.ElasticsearchActionRequestConverter.toIndexRequest(ElasticsearchActionRequestConverter.java:116)
at org.apache.camel.component.elasticsearch.ElasticsearchProducer.process(ElasticsearchProducer.java:161)
at org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)
at org.apache.camel.processor.SendProcessor.process(SendProcessor.java:148)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201)
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197)
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
It would be much better, if error message with explanation is logged instead of NPE .
Attachments
Issue Links
- links to