org.mule.api.transport.DispatchException: Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jms://mule.xxxxxx.in?connector=xxxxServiceMqConnector, connector=ActiveMQJmsConnector{this=246adb31, started=true, initialised=true, name='stateServiceMqConnector', disposed=false, numberOfConcurrentTransactedReceivers=1, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides={message.receiver=org.mule.transport.jms.MultiConsumerJmsMessageReceiver}}, transformer=[ObjectToJMSMessage{this=4808e0e1, name='null', ignoreBadInput=false, returnClass= interface javax.jms.Message, sourceTypes=[]}], name='endpoint.jms.mule.xxxx.in', properties={connector=xxxxServiceMqConnector}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null,synchronous=true, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: HashMap

MuleSoft JIRA | Bill Graham | 8 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    When load testing Mule I'm getting sporadic NPEs from muleClient.send(..) with the stack trace shown below. This seems to be due to JmsConnector.java:521 calling isTransacted() on endpoint.getTransactionConfig(), which is null. I'm not sure why it's only null sporadically, but either way a check for null should be made, since ImmutableEndpoint.getTransactionConfig is documented to potentially return null. Also FYI, when calling muleClient.sendAsync(..) instead of muleClient.send(..) no error appears when a handful of messages get lost. JMS Connector contains the following line: public Session getSession(ImmutableEndpoint endpoint) throws JMSException { final boolean topic = getTopicResolver().isTopic(endpoint); return getSession(endpoint.getTransactionConfig().isTransacted(), topic); } [2008/Nov/24 14:20:42.661] [ActiveMQ Session Task] ERROR XXXX.java:135 Exception sending mule persistState message: org.mule.transport.jms.JmsMessageAdapter/org.mule.transport.jms.JmsMessageAdapter@4e1d4ae9{id=ID:xxxxx.com-37991-1227565039260-2:0:695:1:1, payload=org.apache. activemq.command.ActiveMQTextMessage, correlationId=21c44142-ba76-11dd-a216-99d931504bf1, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, excepti onPayload=null} org.mule.api.transport.DispatchException: Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jms://mule.xxxxxx.in?connector=xxxxServiceMqConnector, connector=ActiveMQJmsConnector{this=246adb31, started=true, initialised=true, name='stateServiceMqConnector', disposed=false, numberOfConcurrentTransactedReceivers=1, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides={message.receiver=org.mule.transport.jms.MultiConsumerJmsMessageReceiver}}, transformer=[ObjectToJMSMessage{this=4808e0e1, name='null', ignoreBadInput=false, returnClass= interface javax.jms.Message, sourceTypes=[]}], name='endpoint.jms.mule.xxxx.in', properties={connector=xxxxServiceMqConnector}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null,synchronous=true, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: HashMap at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:195) at org.mule.transport.AbstractConnector.send(AbstractConnector.java:1910) at org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:77) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327) at org.mule.module.client.MuleClient.send(MuleClient.java:650) at org.mule.module.client.MuleClient.send(MuleClient.java:627) at org.mule.module.client.MuleClient.send(MuleClient.java:580) at xxxxxx at xxxxxx at org.mule.transformer.AbstractMessageAwareTransformer.doTransform(AbstractMessageAwareTransformer.java:68) at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:254) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:608) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:568) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:561) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:316) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:311) at org.mule.component.simple.PassThroughComponent.doInvoke(PassThroughComponent.java:27) at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:125) at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:153) at org.mule.service.AbstractService.invokeComponent(AbstractService.java:932) at org.mule.model.seda.SedaService.doSend(SedaService.java:229) at org.mule.service.AbstractService.sendEvent(AbstractService.java:505) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:220) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:180) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:365) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:253) at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(AbstractReceiverWorker.java:114) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99) at org.mule.transport.AbstractReceiverWorker.doRun(AbstractReceiverWorker.java:131) at org.mule.transport.AbstractReceiverWorker.run(AbstractReceiverWorker.java:62) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.java:41) at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.java:269) at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157) at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubReceiver.onMessage(MultiConsumerJmsMessageReceiver.java:281) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:967) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: org.mule.api.transformer.TransformerException: null (java.lang.NullPointerException) (org.mule.api.transformer.TransformerException) at org.mule.transport.jms.transformers.ObjectToJMSMessage.transform(ObjectToJMSMessage.java:61) at org.mule.transformer.AbstractMessageAwareTransformer.doTransform(AbstractMessageAwareTransformer.java:68) at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:254) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:608) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:568) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:561) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:316) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:311) at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:143) at org.mule.transport.jms.JmsMessageDispatcher.doSend(JmsMessageDispatcher.java:359) at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:168) ... 43 more Caused by: org.mule.api.transformer.TransformerException: null (java.lang.NullPointerException) at org.mule.transport.jms.transformers.AbstractJmsTransformer.transformToMessage(AbstractJmsTransformer.java:79) at org.mule.transport.jms.transformers.ObjectToJMSMessage.transform(ObjectToJMSMessage.java:50) ... 53 more Caused by: java.lang.NullPointerException at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:521) at org.mule.transport.jms.transformers.AbstractJmsTransformer.getSession(AbstractJmsTransformer.java:201) at org.mule.transport.jms.transformers.AbstractJmsTransformer.transformToMessage(AbstractJmsTransformer.java:65) ... 54 more

    MuleSoft JIRA | 8 years ago | Bill Graham
    org.mule.api.transport.DispatchException: Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jms://mule.xxxxxx.in?connector=xxxxServiceMqConnector, connector=ActiveMQJmsConnector{this=246adb31, started=true, initialised=true, name='stateServiceMqConnector', disposed=false, numberOfConcurrentTransactedReceivers=1, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides={message.receiver=org.mule.transport.jms.MultiConsumerJmsMessageReceiver}}, transformer=[ObjectToJMSMessage{this=4808e0e1, name='null', ignoreBadInput=false, returnClass= interface javax.jms.Message, sourceTypes=[]}], name='endpoint.jms.mule.xxxx.in', properties={connector=xxxxServiceMqConnector}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null,synchronous=true, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: HashMap
  2. 0

    When load testing Mule I'm getting sporadic NPEs from muleClient.send(..) with the stack trace shown below. This seems to be due to JmsConnector.java:521 calling isTransacted() on endpoint.getTransactionConfig(), which is null. I'm not sure why it's only null sporadically, but either way a check for null should be made, since ImmutableEndpoint.getTransactionConfig is documented to potentially return null. Also FYI, when calling muleClient.sendAsync(..) instead of muleClient.send(..) no error appears when a handful of messages get lost. JMS Connector contains the following line: public Session getSession(ImmutableEndpoint endpoint) throws JMSException { final boolean topic = getTopicResolver().isTopic(endpoint); return getSession(endpoint.getTransactionConfig().isTransacted(), topic); } [2008/Nov/24 14:20:42.661] [ActiveMQ Session Task] ERROR XXXX.java:135 Exception sending mule persistState message: org.mule.transport.jms.JmsMessageAdapter/org.mule.transport.jms.JmsMessageAdapter@4e1d4ae9{id=ID:xxxxx.com-37991-1227565039260-2:0:695:1:1, payload=org.apache. activemq.command.ActiveMQTextMessage, correlationId=21c44142-ba76-11dd-a216-99d931504bf1, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, excepti onPayload=null} org.mule.api.transport.DispatchException: Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jms://mule.xxxxxx.in?connector=xxxxServiceMqConnector, connector=ActiveMQJmsConnector{this=246adb31, started=true, initialised=true, name='stateServiceMqConnector', disposed=false, numberOfConcurrentTransactedReceivers=1, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides={message.receiver=org.mule.transport.jms.MultiConsumerJmsMessageReceiver}}, transformer=[ObjectToJMSMessage{this=4808e0e1, name='null', ignoreBadInput=false, returnClass= interface javax.jms.Message, sourceTypes=[]}], name='endpoint.jms.mule.xxxx.in', properties={connector=xxxxServiceMqConnector}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null,synchronous=true, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: HashMap at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:195) at org.mule.transport.AbstractConnector.send(AbstractConnector.java:1910) at org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:77) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327) at org.mule.module.client.MuleClient.send(MuleClient.java:650) at org.mule.module.client.MuleClient.send(MuleClient.java:627) at org.mule.module.client.MuleClient.send(MuleClient.java:580) at xxxxxx at xxxxxx at org.mule.transformer.AbstractMessageAwareTransformer.doTransform(AbstractMessageAwareTransformer.java:68) at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:254) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:608) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:568) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:561) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:316) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:311) at org.mule.component.simple.PassThroughComponent.doInvoke(PassThroughComponent.java:27) at org.mule.component.AbstractComponent.invokeInternal(AbstractComponent.java:125) at org.mule.component.AbstractComponent.invoke(AbstractComponent.java:153) at org.mule.service.AbstractService.invokeComponent(AbstractService.java:932) at org.mule.model.seda.SedaService.doSend(SedaService.java:229) at org.mule.service.AbstractService.sendEvent(AbstractService.java:505) at org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:354) at org.mule.routing.inbound.DefaultInboundRouterCollection.send(DefaultInboundRouterCollection.java:220) at org.mule.routing.inbound.DefaultInboundRouterCollection.route(DefaultInboundRouterCollection.java:180) at org.mule.transport.AbstractMessageReceiver$DefaultInternalMessageListener.onMessage(AbstractMessageReceiver.java:365) at org.mule.transport.AbstractMessageReceiver.routeMessage(AbstractMessageReceiver.java:253) at org.mule.transport.AbstractReceiverWorker$1.doInTransaction(AbstractReceiverWorker.java:114) at org.mule.transaction.TransactionTemplate.execute(TransactionTemplate.java:99) at org.mule.transport.AbstractReceiverWorker.doRun(AbstractReceiverWorker.java:131) at org.mule.transport.AbstractReceiverWorker.run(AbstractReceiverWorker.java:62) at org.mule.work.WorkerContext.run(WorkerContext.java:310) at org.mule.work.SyncWorkExecutor.doExecute(SyncWorkExecutor.java:41) at org.mule.work.MuleWorkManager.executeWork(MuleWorkManager.java:269) at org.mule.work.MuleWorkManager.doWork(MuleWorkManager.java:157) at org.mule.transport.jms.MultiConsumerJmsMessageReceiver$SubReceiver.onMessage(MultiConsumerJmsMessageReceiver.java:281) at org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:967) at org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:122) at org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:192) at org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122) at org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675) at java.lang.Thread.run(Thread.java:595) Caused by: org.mule.api.transformer.TransformerException: null (java.lang.NullPointerException) (org.mule.api.transformer.TransformerException) at org.mule.transport.jms.transformers.ObjectToJMSMessage.transform(ObjectToJMSMessage.java:61) at org.mule.transformer.AbstractMessageAwareTransformer.doTransform(AbstractMessageAwareTransformer.java:68) at org.mule.transformer.AbstractTransformer.transform(AbstractTransformer.java:254) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:608) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:568) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:561) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:316) at org.mule.DefaultMuleEvent.transformMessage(DefaultMuleEvent.java:311) at org.mule.transport.jms.JmsMessageDispatcher.dispatchMessage(JmsMessageDispatcher.java:143) at org.mule.transport.jms.JmsMessageDispatcher.doSend(JmsMessageDispatcher.java:359) at org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:168) ... 43 more Caused by: org.mule.api.transformer.TransformerException: null (java.lang.NullPointerException) at org.mule.transport.jms.transformers.AbstractJmsTransformer.transformToMessage(AbstractJmsTransformer.java:79) at org.mule.transport.jms.transformers.ObjectToJMSMessage.transform(ObjectToJMSMessage.java:50) ... 53 more Caused by: java.lang.NullPointerException at org.mule.transport.jms.JmsConnector.getSession(JmsConnector.java:521) at org.mule.transport.jms.transformers.AbstractJmsTransformer.getSession(AbstractJmsTransformer.java:201) at org.mule.transport.jms.transformers.AbstractJmsTransformer.transformToMessage(AbstractJmsTransformer.java:65) ... 54 more

    MuleSoft JIRA | 8 years ago | Bill Graham
    org.mule.api.transport.DispatchException: Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jms://mule.xxxxxx.in?connector=xxxxServiceMqConnector, connector=ActiveMQJmsConnector{this=246adb31, started=true, initialised=true, name='stateServiceMqConnector', disposed=false, numberOfConcurrentTransactedReceivers=1, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides={message.receiver=org.mule.transport.jms.MultiConsumerJmsMessageReceiver}}, transformer=[ObjectToJMSMessage{this=4808e0e1, name='null', ignoreBadInput=false, returnClass= interface javax.jms.Message, sourceTypes=[]}], name='endpoint.jms.mule.xxxx.in', properties={connector=xxxxServiceMqConnector}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null,synchronous=true, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: HashMap

    Root Cause Analysis

    1. org.mule.api.transport.DispatchException

      Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=jms://mule.xxxxxx.in?connector=xxxxServiceMqConnector, connector=ActiveMQJmsConnector{this=246adb31, started=true, initialised=true, name='stateServiceMqConnector', disposed=false, numberOfConcurrentTransactedReceivers=1, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[jms], serviceOverrides={message.receiver=org.mule.transport.jms.MultiConsumerJmsMessageReceiver}}, transformer=[ObjectToJMSMessage{this=4808e0e1, name='null', ignoreBadInput=false, returnClass= interface javax.jms.Message, sourceTypes=[]}], name='endpoint.jms.mule.xxxx.in', properties={connector=xxxxServiceMqConnector}, transactionConfig=Transaction{factory=null, action=NEVER, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null,synchronous=true, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: HashMap

      at org.mule.transport.AbstractMessageDispatcher.send()
    2. Mule Core
      DefaultMuleSession.sendEvent
      1. org.mule.transport.AbstractMessageDispatcher.send(AbstractMessageDispatcher.java:195)
      2. org.mule.transport.AbstractConnector.send(AbstractConnector.java:1910)
      3. org.mule.endpoint.DefaultOutboundEndpoint.send(DefaultOutboundEndpoint.java:77)
      4. org.mule.DefaultMuleSession.sendEvent(DefaultMuleSession.java:327)
      4 frames
    3. Mule Client
      MuleClient.send
      1. org.mule.module.client.MuleClient.send(MuleClient.java:650)
      2. org.mule.module.client.MuleClient.send(MuleClient.java:627)
      3. org.mule.module.client.MuleClient.send(MuleClient.java:580)
      3 frames