java.lang.NullPointerException

MuleSoft JIRA | German de la Cruz | 10 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

    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!

    MuleSoft JIRA | 10 years ago | German de la Cruz
    java.lang.NullPointerException
  2. 0

    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!

    MuleSoft JIRA | 10 years ago | German de la Cruz
    java.lang.NullPointerException
  3. 0

    Getting a nullpointer exception when switching displayables in J2ME

    Stack Overflow | 6 years ago | Pallinder
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    J2ME (Java) - Null Pointer Exception caught in Display Class

    Stack Overflow | 6 years ago | Tom
    java.lang.NullPointerException: 0 at javax.microedition.lcdui.Display$ChameleonTunnel.callScreenListener(), bci=46 at com.sun.midp.chameleon.layers.SoftButtonLayer.processCommand(), bci=74 at com.sun.midp.chameleon.layers.SoftButtonLayer.soft1(), bci=37 at com.sun.midp.chameleon.layers.SoftButtonLayer.keyInput(), bci=36 at com.sun.midp.chameleon.CWindow.keyInput(), bci=38 at javax.microedition.lcdui.Display$DisplayEventConsumerImpl.handleKeyEvent(), bci=17 at com.sun.midp.lcdui.DisplayEventListener.process(), bci=277 at com.sun.midp.events.EventQueue.run(), bci=179
  6. 0

    Cloud Foundry v2 in Grails

    Stack Overflow | 2 years ago | angelo087
    java.lang.NullPointerException: Cannot invoke method getAt() on null object

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at pampa.statistics.mule.ToSampleTransformer.doTransform()
    2. pampa.statistics.mule
      ToSampleTransformer.doTransform
      1. pampa.statistics.mule.ToSampleTransformer.doTransform(ToSampleTransformer.java:61)
      1 frame
    3. org.mule.transformers
      AbstractTransformer.transform
      1. org.mule.transformers.AbstractTransformer.transform(AbstractTransformer.java:239)
      1 frame
    4. org.mule.impl
      MuleEvent.getTransformedMessage
      1. org.mule.impl.MuleEvent.getTransformedMessage(MuleEvent.java:356)
      1 frame
    5. org.mule.providers
      PollingMessageReceiver.run
      1. org.mule.providers.vm.VMMessageReceiver.getMessages(VMMessageReceiver.java:115)
      2. org.mule.providers.TransactedPollingMessageReceiver.poll(TransactedPollingMessageReceiver.java:116)
      3. org.mule.providers.PollingMessageReceiver.run(PollingMessageReceiver.java:71)
      3 frames
    6. pampa.integration.support
      RegistrySupportRunnable.run
      1. pampa.integration.support.RegistrySupportRunnable.run(RegistrySupportRunnable.java:29)
      1 frame
    7. org.mule.impl
      WorkerContext.run
      1. org.mule.impl.work.WorkerContext.run(WorkerContext.java:310)
      1 frame
    8. Backport of JSR 166
      ThreadPoolExecutor$Worker.run
      1. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:643)
      2. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:668)
      2 frames
    9. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame