Statistics Service throws NPE with DynamicEndpoints
---------------------------------------------------

                 Key: SM-1926
                 URL: https://issues.apache.org/activemq/browse/SM-1926
             Project: ServiceMix
          Issue Type: Bug
          Components: servicemix-core
    Affects Versions: 3.3.1
            Reporter: Mark Ford
            Priority: Minor


I am seeing NPE's in the console when using dynamic endpoints with the 
HttpComponent. 

The stacktraces don't seem to impact the message exchanges. One workaround is 
to simply disable the service in conf/servicemix.xml. It would be easy to patch 
the code to avoid the NPE but I'm not sure whether the dynamic endpoints should 
be included in the stats and if so why the StatsService doesn't pick up on 
their registration. 

Trace from accepting an exchange:
WARN  - DeliveryChannelImpl            - Error calling listener: null
java.lang.NullPointerException
        at 
org.apache.servicemix.jbi.monitoring.StatisticsService.onExchangeAccepted(StatisticsService.java:253)
        at 
org.apache.servicemix.jbi.monitoring.StatisticsService$1.exchangeAccepted(StatisticsService.java:167)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:611)
        at 
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:172)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:168)
        at 
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:619)


Trace from sending an exchange:
WARN  - DeliveryChannelImpl            - Error calling listener: null
java.lang.NullPointerException
        at 
org.apache.servicemix.jbi.monitoring.StatisticsService.onExchangeSent(StatisticsService.java:235)
        at 
org.apache.servicemix.jbi.monitoring.StatisticsService$1.exchangeSent(StatisticsService.java:164)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.doSend(DeliveryChannelImpl.java:380)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:471)
        at 
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.sendSync(DeliveryChannelImpl.java:443)
        at 
org.apache.servicemix.common.EndpointDeliveryChannel.sendSync(EndpointDeliveryChannel.java:115)
        at 
org.apache.servicemix.common.endpoints.SimpleEndpoint.sendSync(SimpleEndpoint.java:74)
        at 
org.apache.servicemix.camel.CamelConsumerEndpoint.process(CamelConsumerEndpoint.java:108)
        at 
org.apache.servicemix.camel.JbiEndpoint$JbiProducer.process(JbiEndpoint.java:94)
        at 
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:151)
        at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:88)
        at 
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:93)
        at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:110)
        at 
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:116)


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to