You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by "Mark Ford (JIRA)" <ji...@apache.org> on 2010/01/20 17:44:43 UTC

[jira] Created: (SM-1926) Statistics Service throws NPE with DynamicEndpoints

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.


[jira] Commented: (SM-1926) Statistics Service throws NPE with DynamicEndpoints

Posted by "Juanjo Vazquez (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/SM-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=57838#action_57838 ] 

Juanjo Vazquez commented on SM-1926:
------------------------------------

We're having this annoying trace too. 

> 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.


[jira] Assigned: (SM-1926) Statistics Service throws NPE with DynamicEndpoints

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang reassigned SM-1926:
--------------------------------

    Assignee: Freeman Fang

> 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
>            Assignee: Freeman Fang
>            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.


[jira] Resolved: (SM-1926) Statistics Service throws NPE with DynamicEndpoints

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Freeman Fang resolved SM-1926.
------------------------------

       Resolution: Fixed
    Fix Version/s: 3.3.2

As generally we use dynamic endpoints on the fly, so  Statistics Service should just skip dynamic endpoint.
I will add Null check to avoid the NPE
commit fix
http://svn.apache.org/viewvc?rev=916100&view=rev

> 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
>            Assignee: Freeman Fang
>            Priority: Minor
>             Fix For: 3.3.2
>
>
> 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.


[jira] Work started: (SM-1926) Statistics Service throws NPE with DynamicEndpoints

Posted by "Freeman Fang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/SM-1926?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on SM-1926 started by Freeman Fang.

> 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
>            Assignee: Freeman Fang
>            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.