【问题标题】:RequiredValueException Issue with mule 3.5.2骡子 3.5.2 的RequiredValueException 问题
【发布时间】:2015-02-17 07:50:02
【问题描述】:

我将我的应用程序从 mule 3.4.2 升级到 3.5.2 版本,之后我在处理 x12 文件时遇到以下给定异常。

2014-12-18 06:41:41,062 [[unionstation-15.1-SNAPSHOT].httpsConnector.receiver.18] 错误 org.mule.exception.DefaultMessagingExceptionStrategy - ****************************************************** ****************************** 消息:带有表达式“invocation:username”的表达式求值器“header”返回空值,但需要一个值。 (org.mule.api.expression.RequiredValueException)。消息有效负载的类型:ContentLengthInputStream 代码:MULE_ERROR-29999 -------------------------------------------------- ------------------------------ 异常堆栈是: 1. 带有表达式“invocation:username”的表达式求值器“header”返回空值,但需要一个值。 (org.mule.api.expression.RequiredValueException) org.mule.expression.ExpressionUtils:235 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/expression/RequiredValueException.html) 2. 带有表达式“invocation:username”的表达式求值器“header”返回空值,但需要一个值。 (org.mule.api.expression.RequiredValueException)。消息有效负载的类型:ContentLengthInputStream (org.mule.api.MessagingException) org.mule.execution.ExceptionToMessagingExceptionExecutionInterceptor:32 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/MessagingException.html) -------------------------------------------------- ------------------------------ 根异常堆栈跟踪: org.mule.api.expression.RequiredValueException:带有表达式“invocation:username”的表达式评估器“header”返回 null,但需要一个值。 在 org.mule.expression.ExpressionUtils.getPropertyInternal(ExpressionUtils.java:235) 在 org.mule.expression.ExpressionUtils.getPropertyWithScope(ExpressionUtils.java:63) 在 org.mule.expression.ExpressionUtils.getPropertyWithScope(ExpressionUtils.java:46) + 3 个以上(设置调试级别日志记录或“-Dmule.verbose.exceptions=true”为所有内容) ****************************************************** ******************************

有人会遇到同样的问题吗?

【问题讨论】:

    标签: mule


    【解决方案1】:

    我在 mule studio 3.5.0 中遇到了同样的错误。

    我阅读了所有标题并访问地图中的元素作为解决方法:

    @ContainsTransformerMethods
    public class HttpToUserTransformer {
        @Transformer
        public User stringToUser(@Payload String s, @InboundHeaders("*") Map<String, String> headers) {
            User user = new User();
            user.setName(headers.get("name"));
            return user;
        }
    }
    

    【讨论】:

      【解决方案2】:

      由于未确定的原因,您的应用程序此时没有流变量用户名。请检查您在何处添加该变量并检查代码是否实际执行。

      如果您需要进一步的帮助,您应该分享设置和读取该变量所涉及的流程。

      【讨论】:

      • 另外,header 表达式求值器是旧的并且已被弃用以支持 MEL。所以最好改用#[flowVars['username']]
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-11-21
      相关资源
      最近更新 更多