You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Andreas Klug (Jira)" <ji...@apache.org> on 2023/01/19 07:15:00 UTC
[jira] [Created] (CAMEL-18954) camel-micrometer
Andreas Klug created CAMEL-18954:
------------------------------------
Summary: camel-micrometer
Key: CAMEL-18954
URL: https://issues.apache.org/jira/browse/CAMEL-18954
Project: Camel
Issue Type: Bug
Components: camel-micrometer
Affects Versions: 3.20.1
Reporter: Andreas Klug
Attachments: repro.zip
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
{code:java}
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)
[…]
{code}
The exception only occurs in case I’m using:
{code:java}
producer.send(ExchangeBuilder.anExchange(context).withBody("hello").build());{code}
It’s working fine in case of
{code:java}
producer.sendBody(“hello”);{code}
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|https://github.com/apache/camel/blob/1d7da244fadca57b4054cc0defb70a70923c06f4/components/camel-micrometer/src/main/java/org/apache/camel/component/micrometer/eventnotifier/MicrometerExchangeEventNotifierNamingStrategy.java#L53].
Pls. find a repo case attached.[^repro.zip]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)