java.lang.NullPointerException

MuleSoft JIRA | Esteban Wasinger | 1 year ago
  1. 0

    When you try to set a variable (record/flow) or payload after having used a Filter module, the AttributeEvaluator throws a NPE. Doing the same logic in other scope for-each or normal flow, works perfectly. *Code Snippet:* {code:xml} <batch:job name="npe-with-batch-and-filterBatch"> <batch:process-records> <batch:step name="Batch_Step"> <set-payload value="#['hi']" doc:name="Set Payload"/> <regex-filter pattern="hi" doc:name="Regex"/> <batch:set-record-variable variableName="someValue" value="#['value']" doc:name="Record Variable"/> </batch:step> </batch:process-records> </batch:job>{code} *Stack Trace:* {code}******************************************************************************** Message : null (java.lang.NullPointerException). Message payload is of type: String Type : org.mule.api.transformer.TransformerMessagingException Code : MULE_ERROR--2 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerMessagingException.html Payload : hi ******************************************************************************** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.util.AttributeEvaluator:78 (null) 2. null (java.lang.NullPointerException). Message payload is of type: String (org.mule.api.transformer.TransformerMessagingException) org.mule.transformer.AbstractTransformer:130 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerMessagingException.html) ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at org.mule.util.AttributeEvaluator.isExpression(AttributeEvaluator.java:78) at org.mule.util.AttributeEvaluator.resolveValue(AttributeEvaluator.java:88) at com.mulesoft.module.batch.processor.AddRecordVariableTransformer.transformMessage(AddRecordVariableTransformer.java:44) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:89) at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1600) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1507) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1485) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1477) at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:114) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94) at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56) at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:41) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94) at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) at com.mulesoft.module.batch.engine.BatchProcessingTemplate.process(BatchProcessingTemplate.java:83) at com.mulesoft.module.batch.DefaultBatchStep.processRecord(DefaultBatchStep.java:334) at com.mulesoft.module.batch.DefaultBatchStep.onRecord(DefaultBatchStep.java:254) at com.mulesoft.module.batch.engine.threading.BatchRecordWork.run(BatchRecordWork.java:85) at org.mule.work.WorkerContext.run(WorkerContext.java:286) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745){code} As workaround extracting the content of the batch step into a new flow/subflow fix the issue. *Attaching Mule App reproducing the issue*

    MuleSoft JIRA | 1 year ago | Esteban Wasinger
    java.lang.NullPointerException
  2. 0

    When you try to set a variable (record/flow) or payload after having used a Filter module, the AttributeEvaluator throws a NPE. Doing the same logic in other scope for-each or normal flow, works perfectly. *Code Snippet:* {code:xml} <batch:job name="npe-with-batch-and-filterBatch"> <batch:process-records> <batch:step name="Batch_Step"> <set-payload value="#['hi']" doc:name="Set Payload"/> <regex-filter pattern="hi" doc:name="Regex"/> <batch:set-record-variable variableName="someValue" value="#['value']" doc:name="Record Variable"/> </batch:step> </batch:process-records> </batch:job>{code} *Stack Trace:* {code}******************************************************************************** Message : null (java.lang.NullPointerException). Message payload is of type: String Type : org.mule.api.transformer.TransformerMessagingException Code : MULE_ERROR--2 JavaDoc : http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerMessagingException.html Payload : hi ******************************************************************************** Exception stack is: 1. null (java.lang.NullPointerException) org.mule.util.AttributeEvaluator:78 (null) 2. null (java.lang.NullPointerException). Message payload is of type: String (org.mule.api.transformer.TransformerMessagingException) org.mule.transformer.AbstractTransformer:130 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/transformer/TransformerMessagingException.html) ******************************************************************************** Root Exception stack trace: java.lang.NullPointerException at org.mule.util.AttributeEvaluator.isExpression(AttributeEvaluator.java:78) at org.mule.util.AttributeEvaluator.resolveValue(AttributeEvaluator.java:88) at com.mulesoft.module.batch.processor.AddRecordVariableTransformer.transformMessage(AddRecordVariableTransformer.java:44) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:89) at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1600) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1507) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1485) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1477) at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:114) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94) at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56) at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:41) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) at org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94) at org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44) at com.mulesoft.module.batch.engine.BatchProcessingTemplate.process(BatchProcessingTemplate.java:83) at com.mulesoft.module.batch.DefaultBatchStep.processRecord(DefaultBatchStep.java:334) at com.mulesoft.module.batch.DefaultBatchStep.onRecord(DefaultBatchStep.java:254) at com.mulesoft.module.batch.engine.threading.BatchRecordWork.run(BatchRecordWork.java:85) at org.mule.work.WorkerContext.run(WorkerContext.java:286) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745){code} As workaround extracting the content of the batch step into a new flow/subflow fix the issue. *Attaching Mule App reproducing the issue*

    MuleSoft JIRA | 1 year ago | Esteban Wasinger
    java.lang.NullPointerException
  3. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    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 org.mule.util.AttributeEvaluator.isExpression()
    2. Mule Core
      AttributeEvaluator.resolveValue
      1. org.mule.util.AttributeEvaluator.isExpression(AttributeEvaluator.java:78)
      2. org.mule.util.AttributeEvaluator.resolveValue(AttributeEvaluator.java:88)
      2 frames
    3. com.mulesoft.module
      AddRecordVariableTransformer.transformMessage
      1. com.mulesoft.module.batch.processor.AddRecordVariableTransformer.transformMessage(AddRecordVariableTransformer.java:44)
      1 frame
    4. Mule Core
      MessageProcessorExecutionTemplate.execute
      1. org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:141)
      2. org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:89)
      3. org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1600)
      4. org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1507)
      5. org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1485)
      6. org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1477)
      7. org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:114)
      8. org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
      9. org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
      10. org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
      11. org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94)
      12. org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56)
      13. org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:41)
      14. org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
      15. org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
      16. org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
      17. org.mule.processor.BlockingProcessorExecutor.executeNext(BlockingProcessorExecutor.java:94)
      18. org.mule.processor.BlockingProcessorExecutor.execute(BlockingProcessorExecutor.java:56)
      19. org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:24)
      20. org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:107)
      21. org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:44)
      21 frames
    5. com.mulesoft.module
      BatchRecordWork.run
      1. com.mulesoft.module.batch.engine.BatchProcessingTemplate.process(BatchProcessingTemplate.java:83)
      2. com.mulesoft.module.batch.DefaultBatchStep.processRecord(DefaultBatchStep.java:334)
      3. com.mulesoft.module.batch.DefaultBatchStep.onRecord(DefaultBatchStep.java:254)
      4. com.mulesoft.module.batch.engine.threading.BatchRecordWork.run(BatchRecordWork.java:85)
      4 frames
    6. Mule Core
      WorkerContext.run
      1. org.mule.work.WorkerContext.run(WorkerContext.java:286)
      1 frame
    7. Java RT
      ThreadPoolExecutor$Worker.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      2 frames