You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Espen Andreassen (Jira)" <ji...@apache.org> on 2020/08/24 09:46:00 UTC

[jira] [Updated] (CAMEL-15457) camel-micrometer: NullPonter exception triggered by EventNotifier

     [ https://issues.apache.org/jira/browse/CAMEL-15457?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Espen Andreassen updated CAMEL-15457:
-------------------------------------
    Description: 
A recent [comit|[https://github.com/apache/camel/pull/3976]] causes NullPointer exceptions in some circumstances, though they are caught and logged as "WARN".

Output from the test testCamelRouteEvents() in MicrometerExchangeEventNotifierTest in master branch:




{noformat}
11:44:32.741 [main] WARN org.apache.camel.support.EventHelper - Error notifying event ID-devbox-1598261669122-0-1 exchange Exchange[ID-devbox-1598261669122-0-1] sending to: direct://in. This exception will be ignored.11:44:32.741 [main] WARN org.apache.camel.support.EventHelper - Error notifying event ID-devbox-1598261669122-0-1 exchange Exchange[ID-devbox-1598261669122-0-1] sending to: direct://in. This exception will be ignored.java.lang.NullPointerException: null at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?] at io.micrometer.core.instrument.ImmutableTag.<init>(ImmutableTag.java:35) ~[micrometer-core-1.5.4.jar:1.5.4] at io.micrometer.core.instrument.Tag.of(Tag.java:29) ~[micrometer-core-1.5.4.jar:1.5.4] at io.micrometer.core.instrument.Tags.of(Tags.java:254) ~[micrometer-core-1.5.4.jar:1.5.4] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifierNamingStrategy.getInflightExchangesTags(MicrometerExchangeEventNotifierNamingStrategy.java:58) ~[classes/:?] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.handleExchangeEvent(MicrometerExchangeEventNotifier.java:80) ~[classes/:?] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.notify(MicrometerExchangeEventNotifier.java:65) ~[classes/:?] at org.apache.camel.support.EventHelper.doNotifyEvent(EventHelper.java:1236) ~[classes/:?] at org.apache.camel.support.EventHelper.notifyExchangeSending(EventHelper.java:700) ~[classes/:?]{noformat}
The problem is that the MicrometerExchangeEventNotifier tries to build/update a metric on inflight exchanges in a route based on an ExchangeEvent with no associated fromRoute/fromRouteId. Events such as "ExchangeSendingEvent", as is created in the test, is an example of such an ExchangeEvent.

 

  was:
A recent [comit|[https://github.com/apache/camel/pull/3976]] causes NullPointer exceptions in some circumstances, though they are caught and logged as "WARN".

Output from the test testCamelRouteEvents() in MicrometerExchangeEventNotifierTest in master branch:
{noformat}
11:10:11.927 [main] WARN org.apache.camel.support.EventHelper - Error notifying event ID-devbox-1598260211922-0-1 exchange Exchange[ID-devbox-1598260211922-0-1] sending to: direct://in. This exception will be ignored.11:10:11.927 [main] ERROR org.apache.camel.support.EventHelper - Error notifying event ID-devbox-1598260211922-0-1 exchange Exchange[ID-devbox-1598260211922-0-1] sending to: direct://in. This exception will be ignored.java.lang.NullPointerException: null at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?] at io.micrometer.core.instrument.ImmutableTag.<init>(ImmutableTag.java:35) ~[micrometer-core-1.5.4.jar:1.5.4] at io.micrometer.core.instrument.Tag.of(Tag.java:29) ~[micrometer-core-1.5.4.jar:1.5.4] at io.micrometer.core.instrument.Tags.of(Tags.java:254) ~[micrometer-core-1.5.4.jar:1.5.4] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifierNamingStrategy.getInflightExchangesTags(MicrometerExchangeEventNotifierNamingStrategy.java:58) ~[classes/:?] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.handleExchangeEvent(MicrometerExchangeEventNotifier.java:80) ~[classes/:?] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.notify(MicrometerExchangeEventNotifier.java:65) ~[classes/:?] at org.apache.camel.support.EventHelper.doNotifyEvent(EventHelper.java:1236) ~[classes/:?] at org.apache.camel.support.EventHelper.notifyExchangeSending(EventHelper.java:700) ~[classes/:?]{noformat}

The problem is that the MicrometerExchangeEventNotifier tries to build/update a metric on inflight exchanges in a route based on an ExchangeEvent with no associated fromRoute/fromRouteId. Events such as "ExchangeSendingEvent", as is created in the test, is an example of such an ExchangeEvent.

 


> camel-micrometer: NullPonter exception triggered by EventNotifier
> -----------------------------------------------------------------
>
>                 Key: CAMEL-15457
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15457
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-micrometer
>            Reporter: Espen Andreassen
>            Priority: Major
>
> A recent [comit|[https://github.com/apache/camel/pull/3976]] causes NullPointer exceptions in some circumstances, though they are caught and logged as "WARN".
> Output from the test testCamelRouteEvents() in MicrometerExchangeEventNotifierTest in master branch:
> {noformat}
> 11:44:32.741 [main] WARN org.apache.camel.support.EventHelper - Error notifying event ID-devbox-1598261669122-0-1 exchange Exchange[ID-devbox-1598261669122-0-1] sending to: direct://in. This exception will be ignored.11:44:32.741 [main] WARN org.apache.camel.support.EventHelper - Error notifying event ID-devbox-1598261669122-0-1 exchange Exchange[ID-devbox-1598261669122-0-1] sending to: direct://in. This exception will be ignored.java.lang.NullPointerException: null at java.util.Objects.requireNonNull(Objects.java:221) ~[?:?] at io.micrometer.core.instrument.ImmutableTag.<init>(ImmutableTag.java:35) ~[micrometer-core-1.5.4.jar:1.5.4] at io.micrometer.core.instrument.Tag.of(Tag.java:29) ~[micrometer-core-1.5.4.jar:1.5.4] at io.micrometer.core.instrument.Tags.of(Tags.java:254) ~[micrometer-core-1.5.4.jar:1.5.4] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifierNamingStrategy.getInflightExchangesTags(MicrometerExchangeEventNotifierNamingStrategy.java:58) ~[classes/:?] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.handleExchangeEvent(MicrometerExchangeEventNotifier.java:80) ~[classes/:?] at org.apache.camel.component.micrometer.eventnotifier.MicrometerExchangeEventNotifier.notify(MicrometerExchangeEventNotifier.java:65) ~[classes/:?] at org.apache.camel.support.EventHelper.doNotifyEvent(EventHelper.java:1236) ~[classes/:?] at org.apache.camel.support.EventHelper.notifyExchangeSending(EventHelper.java:700) ~[classes/:?]{noformat}
> The problem is that the MicrometerExchangeEventNotifier tries to build/update a metric on inflight exchanges in a route based on an ExchangeEvent with no associated fromRoute/fromRouteId. Events such as "ExchangeSendingEvent", as is created in the test, is an example of such an ExchangeEvent.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)