java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I noticed that in an outboundRouter called in an VMMessageReceiver.getMessages(), the RequestCotext.getEventContext returns null always. It is a Bug or there is any reason for that. If it's a bug, I can make a patch if you help me... This is my stack trace 2007-03-28 12:10:14,397 1518009 ERROR [pampa.integration.strategies.exception.MessageForwardingComponentExceptionStrategy] (QueueVM.endpoi nt.vm.StatisticsAggregator.inbound.receiver.1:) Caught exception in Exception Strategy: null java.lang.NullPointerException at pampa.statistics.mule.ToSampleTransformer.doTransform(ToSampleTransformer.java:61) at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:239) at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:356) at org.mule.providers.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:115) at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:116) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:71) at pampa.integration.support.RegistrySupportRunnable.run(RegistrySupportRunnable.java:29) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:595) 2007-03-28 12:10:14,398 1518010 ERROR [pampa.integration.strategies.exception.MessageForwardingComponentExceptionStrategy] (QueueVM.endpoi nt.vm.StatisticsAggregator.inbound.receiver.1:) Message being processed is: org.mule.providers.DefaultMessageAdapter{id=237e7e01-dd3c-11db -ba61-d303c2f270bb, payload=org.mule.impl.message.ExceptionMessage, correlationId=null, correlationGroup=-1, correlationSeq=-1, encoding=U TF-8, exceptionPayload=null, properties={ MULE_ENDPOINT=vm://ProcessSupervisor.inbound }} 2007-03-28 12:10:14,399 1518011 FATAL [pampa.integration.strategies.exception.MessageForwardingComponentExceptionStrategy] (QueueVM.endpoi nt.vm.StatisticsAggregator.inbound.receiver.1:) Failed to dispatch message to error queue after it failed to process. This may cause mess age loss.Logging Message here: org.mule.providers.DefaultMessageAdapter{id=237e7e01-dd3c-11db-ba61-d303c2f270bb, payload=org.mule.impl.message.ExceptionMessage, correlat ionId=null, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, exceptionPayload=null, properties={ MULE_ENDPOINT=vm://ProcessSupervisor.inbound }} and this is my transformer code... {code:java} protected Object doTransform(Object payload, String encoding) throws TransformerException { UMOMessage message = RequestContext.getEventContext().getMessage(); String valueExpression = (String) message.getProperty("sample.value"); Map<String, String> keyExpressions = (Map<String, String>) message.getProperty("sample.key"); Map<String, Object> context = UMOUtils.getProperties(message); ... return new Sample(key, value); } {code} Thanks!
    via by German de la Cruz,
  • I noticed that in an outboundRouter called in an VMMessageReceiver.getMessages(), the RequestCotext.getEventContext returns null always. It is a Bug or there is any reason for that. If it's a bug, I can make a patch if you help me... This is my stack trace 2007-03-28 12:10:14,397 1518009 ERROR [pampa.integration.strategies.exception.MessageForwardingComponentExceptionStrategy] (QueueVM.endpoi nt.vm.StatisticsAggregator.inbound.receiver.1:) Caught exception in Exception Strategy: null java.lang.NullPointerException at pampa.statistics.mule.ToSampleTransformer.doTransform(ToSampleTransformer.java:61) at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:239) at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:356) at org.mule.providers.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:115) at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:116) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:71) at pampa.integration.support.RegistrySupportRunnable.run(RegistrySupportRunnable.java:29) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:595) 2007-03-28 12:10:14,398 1518010 ERROR [pampa.integration.strategies.exception.MessageForwardingComponentExceptionStrategy] (QueueVM.endpoi nt.vm.StatisticsAggregator.inbound.receiver.1:) Message being processed is: org.mule.providers.DefaultMessageAdapter{id=237e7e01-dd3c-11db -ba61-d303c2f270bb, payload=org.mule.impl.message.ExceptionMessage, correlationId=null, correlationGroup=-1, correlationSeq=-1, encoding=U TF-8, exceptionPayload=null, properties={ MULE_ENDPOINT=vm://ProcessSupervisor.inbound }} 2007-03-28 12:10:14,399 1518011 FATAL [pampa.integration.strategies.exception.MessageForwardingComponentExceptionStrategy] (QueueVM.endpoi nt.vm.StatisticsAggregator.inbound.receiver.1:) Failed to dispatch message to error queue after it failed to process. This may cause mess age loss.Logging Message here: org.mule.providers.DefaultMessageAdapter{id=237e7e01-dd3c-11db-ba61-d303c2f270bb, payload=org.mule.impl.message.ExceptionMessage, correlat ionId=null, correlationGroup=-1, correlationSeq=-1, encoding=UTF-8, exceptionPayload=null, properties={ MULE_ENDPOINT=vm://ProcessSupervisor.inbound }} and this is my transformer code... {code:java} protected Object doTransform(Object payload, String encoding) throws TransformerException { UMOMessage message = RequestContext.getEventContext().getMessage(); String valueExpression = (String) message.getProperty("sample.value"); Map<String, String> keyExpressions = (Map<String, String>) message.getProperty("sample.key"); Map<String, Object> context = UMOUtils.getProperties(message); ... return new Sample(key, value); } {code} Thanks!
    via by German de la Cruz,
    • java.lang.NullPointerException at pampa.statistics.mule.ToSampleTransformer.doTransform(ToSampleTransformer.java:61) at org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:239) at org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:356) at org.mule.providers.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:115) at org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:116) at org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:71) at pampa.integration.support.RegistrySupportRunnable.run(RegistrySupportRunnable.java:29) at org.mule.impl.work.WorkerContext.run(WorkerContext.java:310) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668) at java.lang.Thread.run(Thread.java:595)
    No Bugmate found.