[switchyard-issues] [JBoss JIRA] Created: (SWITCHYARD-326) Camel JMS Route throws NullPointerException when the route is stopped.

Daniel Bevenius (JIRA) jira-events at lists.jboss.org
Thu Jun 30 02:10:23 EDT 2011


Camel JMS Route throws NullPointerException when the route is stopped.
----------------------------------------------------------------------

                 Key: SWITCHYARD-326
                 URL: https://issues.jboss.org/browse/SWITCHYARD-326
             Project: SwitchYard
          Issue Type: Bug
          Components: component-camel
            Reporter: Daniel Bevenius
            Assignee: Daniel Bevenius
             Fix For: 0.2


The following NullPointerException can be seen in the logs when A Camel JMS route is stopped:
{noformat}
8:04:19,257 INFO  [impl.DefaultShutdownStrategy] Route: SimpleCamelService-[jms://TestQueue?connectionFactory=#ConnectionFactory] suspended and shutdown deferred, was consuming from: Endpoint[jms://TestQueue?connectionFactory=%23ConnectionFactory]
08:04:19,258 WARN  [impl.DefaultShutdownStrategy] Error occurred while shutting down route: Consumer[jms://TestQueue?connectionFactory=%23ConnectionFactory]. This exception will be ignored.
java.lang.NullPointerException
	at org.apache.camel.component.jms.JmsConsumer.doStop(JmsConsumer.java:130)
	at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:98)
	at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:122)
	at org.apache.camel.util.ServiceHelper.stopService(ServiceHelper.java:108)
	at org.apache.camel.impl.DefaultShutdownStrategy.shutdownNow(DefaultShutdownStrategy.java:248)
	at org.apache.camel.impl.DefaultShutdownStrategy$ShutdownTask.run(DefaultShutdownStrategy.java:475)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	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:680)
08:04:19,258 INFO  [impl.DefaultShutdownStrategy] Route: SimpleCamelService-[jms://TestQueue?connectionFactory=#ConnectionFactory] shutdown complete.
08:04:19,259 INFO  [impl.DefaultShutdownStrategy] Graceful shutdown of 1 routes completed in 0 seconds
{noformat}
By stepping through this it seems like Camel is trying to stop the route twice, once which is triggered by SwitchYard's InboundHandler and a second time by Camel. The second call is what is producing this NPE.



--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the switchyard-issues mailing list