file - 为什么在对特定 Excel 文件使用开关/步骤时预览选项会抛出错误?

标签 file nullpointerexception switch-statement pentaho preview

我有一个 Excel 文件,我想使用 Switch/case 对其进行过滤。名为 error 的转换:

The Transformation

返回:

2018/03/01 11:48:00 - Spoon - Using legacy execution engine
2018/03/01 11:48:00 - Spoon - Transformation opened.
2018/03/01 11:48:00 - Spoon - Launching transformation [error]...
2018/03/01 11:48:00 - Spoon - Started the transformation execution.
2018/03/01 11:48:00 - error - Dispatching started for transformation [error]
2018/03/01 11:48:00 - Microsoft Excel Input.0 - Finished processing (I=108, O=0, R=0, W=108, U=0, E=0)
2018/03/01 11:48:00 - Switch / case.0 - Finished processing (I=0, O=0, R=108, W=108, U=0, E=0)
2018/03/01 11:48:00 - Dummy (do nothing).0 - Finished processing (I=0, O=0, R=108, W=108, U=0, E=0)
2018/03/01 11:48:00 - Spoon - The transformation has finished!!

运行时。但是它会抛出错误:

The Error

2018/03/01 11:49:07 - error - Dispatching started for transformation [error]
2018/03/01 11:49:07 - Switch / case.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Unexpected error
2018/03/01 11:49:07 - Switch / case.0 - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : java.lang.NullPointerException
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.safeModeChecking(BaseStep.java:2129)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.handleGetRow(BaseStep.java:1942)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.access$100(BaseStep.java:147)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep$DefaultRowHandler.getRow(BaseStep.java:4180)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.BaseStep.getRow(BaseStep.java:1797)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.steps.switchcase.SwitchCase.processRow(SwitchCase.java:65)
2018/03/01 11:49:07 - Switch / case.0 -     at org.pentaho.di.trans.step.RunThread.run(RunThread.java:62)
2018/03/01 11:49:07 - Switch / case.0 -     at java.lang.Thread.run(Thread.java:748)
2018/03/01 11:49:07 - Switch / case.0 - Finished processing (I=0, O=0, R=1, W=0, U=0, E=1)
2018/03/01 11:49:07 - Microsoft Excel Input.0 - Finished processing (I=11, O=0, R=0, W=10, U=0, E=0)
2018/03/01 11:49:07 - error - Transformation detected one or more steps with errors.
2018/03/01 11:49:07 - error - Transformation is killing the other steps!
2018/03/01 11:49:07 - error - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!
2018/03/01 11:49:07 - Spoon - The transformation has finished!!
2018/03/01 11:49:07 - error - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!
2018/03/01 11:49:07 - error - ERROR (version 8.0.0.0-28, build 8.0.0.0-28 from 2017-11-05 07.27.50 by buildguy) : Errors detected!

右键单击/预览...在任何步骤中使用时,我无法预览任何步骤中的数据>之后 开关/案例。而Execution Results下的Preview data选项卡可以预览所有步骤中的数据。

我尝试使用生成行步骤或使用另一个文件来重现错误,但不成功,所以这似乎表明Switch/case 不喜欢我的特定文件中的某些内容,但我目前无法确定。

为什么会发生这种情况?我怎样才能防止这种情况发生?

最佳答案

问题是我在 Microsoft Excel 输入 步骤中有一个空命名字段。我将其重命名为实际包含非空字符串,问题已解决。

关于file - 为什么在对特定 Excel 文件使用开关/步骤时预览选项会抛出错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49045918/

相关文章:

javascript - Buffer.toString ('binary' ) 添加 "new characters"

java - 在 setContentView(R.layout.activity_home_screen) 处获取 NullPointerException;

java - Android DrawerLayout 与 NullPointerException

java - 不间断切换

if-statement - keras( tensorflow 后端)使用 K.switch() 进行条件分配

linux - fwrite 的剖析

file - flutter 。文件 existsSync() 总是返回 false

python - 尝试加载 5GB 文本文件时出现 MemoryError

r - K-Skip-N-Gram : generalization of for-loops in R

java - ServerRpcHandler 中的 Vaadin NPE