Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.20.1
-
None
-
Unknown
Description
Hello everyone,
Unfortunately when I’m testing a route containing a micrometer endpoint on Camel 3.20.1 using Spring Boot, then I’m getting a
java.lang.NullPointerException: null
at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifierNamingStrategy.getTags(MicrometerExchangeEventNotifierNamingStrategy.java:53)
at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.handleDoneEvent(MicrometerExchangeEventNotifier.java:105)
at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.notify(MicrometerExchangeEventNotifier.java:75)
[…]
The exception only occurs in case I’m using:
producer.send(ExchangeBuilder.anExchange(context).withBody("hello").build());
It’s working fine in case of
producer.sendBody(“hello”);
For both statements, in 3.18.3 it’s working fine – in any case, meaning in 3.18.3 and 3.20.1, the ExchangeBuilder.anExchange(context).withBody("hello").build().getEndpointFrom() is null, however, only in 3.20.1 it looks like that getEndpointFrom() indirectly causes the NPE in line 53.
Pls. find a repo case attached.repro.zip
Attachments
Attachments
Issue Links
- relates to
-
CAMEL-18986 camel-core - ProducerTemplate send exchange should set from endpoint if null
- Resolved