org.mule.api.transformer.TransformerMessagingException

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.

  • Considering this sub-flow: {code:xml} <sub-flow name="subflow_1"> <set-payload value="tested!" /> </sub-flow> {code} one could expect that testing it with: {code:java} MessageProcessor subFlow = muleContext.getRegistry().lookupObject("subflow_1"); MuleEvent result = subFlow.process(getTestEvent("test_data")); {code} would work, but it doesn't and throws the exception below. So it would be nice if the Mule functional test toolkit could provide a way to test sub-flows. {noformat} org.mule.api.transformer.TransformerMessagingException: null (java.lang.NullPointerException). Message payload is of type: String at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:139) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:93) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:57) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.access$001(InterceptingChainLifecycleWrapper.java:29) at org.mule.processor.chain.InterceptingChainLifecycleWrapper$1.process(InterceptingChainLifecycleWrapper.java:90) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:85) at org.mule.api.processor.MessageProcessors$LifecyleAwareMessageProcessorWrapper.process(MessageProcessors.java:114) at net.dossot.GenericTest.doIt(GenericTest.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:46) at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28) Caused by: java.lang.NullPointerException at org.mule.util.AttributeEvaluator.isExpression(AttributeEvaluator.java:65) at org.mule.util.AttributeEvaluator.resolveValue(AttributeEvaluator.java:75) at org.mule.transformer.simple.SetPayloadTransformer.transformMessage(SetPayloadTransformer.java:50) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:145) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:93) at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1455) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1363) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1341) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1333) at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:123) ... 27 more {noformat}
    via by David Dossot,
  • Considering this sub-flow: {code:xml} <sub-flow name="subflow_1"> <set-payload value="tested!" /> </sub-flow> {code} one could expect that testing it with: {code:java} MessageProcessor subFlow = muleContext.getRegistry().lookupObject("subflow_1"); MuleEvent result = subFlow.process(getTestEvent("test_data")); {code} would work, but it doesn't and throws the exception below. So it would be nice if the Mule functional test toolkit could provide a way to test sub-flows. {noformat} org.mule.api.transformer.TransformerMessagingException: null (java.lang.NullPointerException). Message payload is of type: String at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:139) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:93) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:57) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.access$001(InterceptingChainLifecycleWrapper.java:29) at org.mule.processor.chain.InterceptingChainLifecycleWrapper$1.process(InterceptingChainLifecycleWrapper.java:90) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:85) at org.mule.api.processor.MessageProcessors$LifecyleAwareMessageProcessorWrapper.process(MessageProcessors.java:114) at net.dossot.GenericTest.doIt(GenericTest.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:46) at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28) Caused by: java.lang.NullPointerException at org.mule.util.AttributeEvaluator.isExpression(AttributeEvaluator.java:65) at org.mule.util.AttributeEvaluator.resolveValue(AttributeEvaluator.java:75) at org.mule.transformer.simple.SetPayloadTransformer.transformMessage(SetPayloadTransformer.java:50) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:145) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:93) at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1455) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1363) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1341) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1333) at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:123) ... 27 more {noformat}
    via by David Dossot,
  • [MULE-6632] Provide a way to test sub-flows - JIRA
    via by Unknown author,
  • 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*
    via by Esteban Wasinger,
  • 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*
    via by Esteban Wasinger,
    • org.mule.api.transformer.TransformerMessagingException: null (java.lang.NullPointerException). Message payload is of type: String at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:139) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) at org.mule.processor.chain.DefaultMessageProcessorChain.doProcess(DefaultMessageProcessorChain.java:93) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.doProcess(InterceptingChainLifecycleWrapper.java:57) at org.mule.processor.chain.AbstractMessageProcessorChain.process(AbstractMessageProcessorChain.java:66) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.access$001(InterceptingChainLifecycleWrapper.java:29) at org.mule.processor.chain.InterceptingChainLifecycleWrapper$1.process(InterceptingChainLifecycleWrapper.java:90) at org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor.execute(ExceptionToMessagingExceptionExecutionInterceptor.java:27) at org.mule.execution.MessageProcessorNotificationExecutionInterceptor.execute(MessageProcessorNotificationExecutionInterceptor.java:43) at org.mule.execution.MessageProcessorExecutionTemplate.execute(MessageProcessorExecutionTemplate.java:43) at org.mule.processor.chain.InterceptingChainLifecycleWrapper.process(InterceptingChainLifecycleWrapper.java:85) at org.mule.api.processor.MessageProcessors$LifecyleAwareMessageProcessorWrapper.process(MessageProcessors.java:114) at net.dossot.GenericTest.doIt(GenericTest.java:21) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:616) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.junit.rules.TestWatcher$1.evaluate(TestWatcher.java:46) at org.junit.internal.runners.statements.FailOnTimeout$1.run(FailOnTimeout.java:28) Caused by: java.lang.NullPointerException at org.mule.util.AttributeEvaluator.isExpression(AttributeEvaluator.java:65) at org.mule.util.AttributeEvaluator.resolveValue(AttributeEvaluator.java:75) at org.mule.transformer.simple.SetPayloadTransformer.transformMessage(SetPayloadTransformer.java:50) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:145) at org.mule.transformer.AbstractMessageTransformer.transform(AbstractMessageTransformer.java:93) at org.mule.DefaultMuleMessage.transformMessage(DefaultMuleMessage.java:1455) at org.mule.DefaultMuleMessage.applyAllTransformers(DefaultMuleMessage.java:1363) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1341) at org.mule.DefaultMuleMessage.applyTransformers(DefaultMuleMessage.java:1333) at org.mule.transformer.AbstractTransformer.process(AbstractTransformer.java:123) ... 27 more
    No Bugmate found.