org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required.

MuleSoft JIRA | Ken Yagen | 6 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    When I had a one-way endpoint, the error is not getting logged for the exception but it shows up when I changed it to a request response. Error was caused when I mapped the http request to a map payload and referenced the name of something that wasn't in the map. When I changed it to request-response, got the error: 2011-10-02 12:36 PM [ERROR]Caught exception in Exception Strategy: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. Even for one-way, I think the error should have been logged. [12:33:42 PM] Dan Diephouse: can you try changing it to a request-response exchange? I think you might get a better error that way [12:33:52 PM] Ken Yagen: sure [12:36:35 PM] Dan Diephouse: another thing is to try a custom exception strategy - although I would think by default it would at least log the exception to ERROR [12:36:46 PM] Ken Yagen: that helped! (changing to request-response) [12:37:04 PM] Ken Yagen: 2011-10-02 12:36 PM [ERROR]Caught exception in Exception Strategy: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. at org.mule.expression.MapPayloadExpressionEvaluator.getValue(MapPayloadExpressionEvaluator.java:87) at org.mule.expression.MapPayloadExpressionEvaluator.evaluate(MapPayloadExpressionEvaluator.java:64) at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:273) at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:209) at org.mule.expression.DefaultExpressionManager$1.match(DefaultExpressionManager.java:399) at [12:37:20 PM] Dan Diephouse: so mule isn't logging the exception properly

    MuleSoft JIRA | 6 years ago | Ken Yagen
    org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required.
  2. 0

    When I had a one-way endpoint, the error is not getting logged for the exception but it shows up when I changed it to a request response. Error was caused when I mapped the http request to a map payload and referenced the name of something that wasn't in the map. When I changed it to request-response, got the error: 2011-10-02 12:36 PM [ERROR]Caught exception in Exception Strategy: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. Even for one-way, I think the error should have been logged. [12:33:42 PM] Dan Diephouse: can you try changing it to a request-response exchange? I think you might get a better error that way [12:33:52 PM] Ken Yagen: sure [12:36:35 PM] Dan Diephouse: another thing is to try a custom exception strategy - although I would think by default it would at least log the exception to ERROR [12:36:46 PM] Ken Yagen: that helped! (changing to request-response) [12:37:04 PM] Ken Yagen: 2011-10-02 12:36 PM [ERROR]Caught exception in Exception Strategy: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required. at org.mule.expression.MapPayloadExpressionEvaluator.getValue(MapPayloadExpressionEvaluator.java:87) at org.mule.expression.MapPayloadExpressionEvaluator.evaluate(MapPayloadExpressionEvaluator.java:64) at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:273) at org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:209) at org.mule.expression.DefaultExpressionManager$1.match(DefaultExpressionManager.java:399) at [12:37:20 PM] Dan Diephouse: so mule isn't logging the exception properly

    MuleSoft JIRA | 6 years ago | Ken Yagen
    org.mule.api.expression.RequiredValueException: Expression Evaluator "map-payload" with expression "body" returned null but a value was required.

    Root Cause Analysis

    1. org.mule.api.expression.RequiredValueException

      Expression Evaluator "map-payload" with expression "body" returned null but a value was required.

      at org.mule.expression.MapPayloadExpressionEvaluator.getValue()
    2. Mule Core
      DefaultExpressionManager$1.match
      1. org.mule.expression.MapPayloadExpressionEvaluator.getValue(MapPayloadExpressionEvaluator.java:87)
      2. org.mule.expression.MapPayloadExpressionEvaluator.evaluate(MapPayloadExpressionEvaluator.java:64)
      3. org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:273)
      4. org.mule.expression.DefaultExpressionManager.evaluate(DefaultExpressionManager.java:209)
      5. org.mule.expression.DefaultExpressionManager$1.match(DefaultExpressionManager.java:399)
      5 frames