You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Pentaho HTTP Post步骤运行时报错'Name may not be null'求助

Pentaho HTTP Post步骤预览正常但正式运行报"Name may not be null"错误

问题详情

  • 预览HTTP Post步骤可正常完成Post请求,但正式运行转换时,该步骤抛出Name may not be null错误,步骤中未配置对应name字段。
  • 已尝试单条请求、多条请求、迭代运行、精简负载等操作,预览均正常,正式运行均报错。
  • 测试版本:Pentaho 9.0、9.4(实际运行版本为9.2.0.0-290)

错误日志

2024/08/14 09:00:39 - Carte - Installing timer to purge stale objects after 1440 minutes.
2024/08/14 09:00:52 - Spoon - Running transformation using the Kettle execution engine
2024/08/14 09:00:52 - Spoon - Transformation opened.
2024/08/14 09:00:52 - Spoon - Launching transformation [true_post_iterrative]...
2024/08/14 09:00:52 - Spoon - Started the transformation execution.
2024/08/14 09:00:53 - true_post_iterrative - Dispatching started for transformation [true_post_iterrative]
2024/08/14 09:00:53 - url.0 - Finished processing (I=0, O=0, R=0, W=1, U=0, E=0)
2024/08/14 09:00:53 - Microsoft Excel input.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0)
2024/08/14 09:00:53 - Modified JavaScript value.0 - Optimization level set to 9.
2024/08/14 09:00:54 - Modified JavaScript value.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - Add constants.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - Merge join.0 - Finished processing (I=0, O=0, R=2, W=1, U=0, E=0)
2024/08/14 09:00:54 - HTTP post.0 - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Unexpected error
2024/08/14 09:00:54 - HTTP post.0 - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : java.lang.IllegalArgumentException: Name may not be null
2024/08/14 09:00:54 - HTTP post.0 -     at org.apache.http.util.Args.notNull(Args.java:54)
2024/08/14 09:00:54 - HTTP post.0 -     at org.apache.http.message.BasicNameValuePair.<init>(BasicNameValuePair.java:59)
2024/08/14 09:00:54 - HTTP post.0 -     at org.pentaho.di.trans.steps.httppost.HTTPPOST.processRow(HTTPPOST.java:436)
2024/08/14 09:00:54 - HTTP post.0 -     at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2024/08/14 09:00:54 - HTTP post.0 -     at java.lang.Thread.run(Unknown Source)
2024/08/14 09:00:54 - HTTP post.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
2024/08/14 09:00:54 - true_post_iterrative - Transformation detected one or more steps with errors.
2024/08/14 09:00:54 - true_post_iterrative - Transformation is killing the other steps!
2024/08/14 09:00:54 - Select values.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - Dummy (do nothing) 3.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0)
2024/08/14 09:00:54 - true_post_iterrative - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Errors detected!
2024/08/14 09:00:54 - Spoon - The transformation has finished!!
2024/08/14 09:00:54 - true_post_iterrative - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Errors detected!
2024/08/14 09:00:54 - true_post_iterrative - ERROR (version 9.2.0.0-290, build 9.2.0.0-290 from 2021-06-02 06.36.08 by buildguy) : Errors detected!

排查与解决方法

  1. 检查参数配置是否存在空名称
    日志报错指向BasicNameValuePair的name为空,说明构建请求参数时存在参数名null的情况。检查HTTP Post步骤的**"Fields to send"或"Parameters"**配置项,是否有未填写参数名但保留参数值的条目,或者引用的变量为空。
  2. 过滤空参数名字段
    预览用的测试数据可能无空值,但正式运行时流入的字段中,作为参数名的字段值为null。添加**"Select values"**步骤,过滤掉参数名字段为空的行,或给该字段设置默认值。
  3. 切换请求体格式
    若发送JSON请求,确保在HTTP Post步骤中勾选**"Send JSON"**选项,避免使用默认表单参数模式——表单模式会自动将字段转为NameValuePair,字段名空时就会触发错误。
  4. 验证版本兼容性
    日志显示实际运行版本为9.2,可在9.4版本中重新创建HTTP Post步骤,排除旧版本的bug影响。

内容的提问来源于stack exchange,提问作者Andreas Fredriksson

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.19 13:48:11