关于Pentaho的问题“org.apache.commons.vfs.FileSystemException:文件已关闭。”

时间:2015-03-04 19:22:13

标签: excel pentaho

我和pentaho有点问题。

事情是我在“执行结果”中记录错误...

2015/03/04 12:41:16 - Spoon - Transformation opened. 2015/03/04 12:41:16 - Spoon - Launching transformation [plazo_x_cliente4]... 2015/03/04 12:41:16 - Spoon - Started the transformation execution. 2015/03/04 12:41:16 - plazo_x_cliente4 - Dispatching started for transformation [plazo_x_cliente4] 2015/03/04 12:41:16 - Transformation metadata - Natural sort of steps executed in 0 ms (3 time previous steps calculated) 2015/03/04 12:41:16 - plazo_x_cliente.0 - Finished reading query, closing connection. 2015/03/04 12:41:16 - plazo_x_cliente.0 - Finished processing (I=1, O=0, R=0, W=1, U=0, E=0) 2015/03/04 12:41:16 - Copy rows to result 2.0 - Finished processing (I=0, O=0, R=1, W=1, U=0, E=0) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Unexpected error 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : org.pentaho.di.core.exception.KettleException: 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : org.apache.commons.vfs.FileSystemException: File closed. 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : File closed. 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at org.pentaho.di.trans.steps.excelwriter.ExcelWriterStep.closeOutputFile(ExcelWriterStep.java:221) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at org.pentaho.di.trans.steps.excelwriter.ExcelWriterStep.processRow(ExcelWriterStep.java:168) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at org.pentaho.di.trans.step.RunThread.run(RunThread.java:40) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at java.lang.Thread.run(Unknown Source) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Caused by: org.apache.commons.vfs.FileSystemException: File closed. 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at org.apache.commons.vfs.util.MonitorOutputStream.assertOpen(Unknown Source) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at org.apache.commons.vfs.util.MonitorOutputStream.flush(Unknown Source) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at java.io.BufferedOutputStream.flush(Unknown Source) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at java.io.FilterOutputStream.close(Unknown Source) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : at org.pentaho.di.trans.steps.excelwriter.ExcelWriterStep.closeOutputFile(ExcelWriterStep.java:219) 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : ... 3 more 2015/03/04 12:41:16 - plazo_x_cliente.xlsx.0 - Finished processing (I=0, O=2, R=1, W=1, U=0, E=1) 2015/03/04 12:41:16 - Spoon - The transformation has finished!! 2015/03/04 12:41:16 - plazo_x_cliente4 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Errors detected! 2015/03/04 12:41:16 - plazo_x_cliente4 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Errors detected! 2015/03/04 12:41:16 - plazo_x_cliente4 - plazo_x_cliente4 2015/03/04 12:41:16 - plazo_x_cliente4 - plazo_x_cliente4

基本上我一直在尝试将“输入表”导出到“Microsoft Excel Writer” 此外 我有Windows 7, Pentaho 4.2.1稳定 和Excel 2007(扩展名xlsx)

然而,所有这些都有些奇怪。尽管如此,信息会在excel文件中更新,这很好但是之后的第二次转换不会运行。

衷心感谢你


感谢Rishu的回答...

我一直试图在没有工作的情况下进行转型,并在转型时解决这个问题。我想。

你能帮助我吗?

我正在使用“Microsoft Excel Writer”,我必须使用“Microsoft Excel输出”吗?我告诉你,因为我读过你的博客。

再次感谢

1 个答案:

答案 0 :(得分:0)

提供的日志有两个可能的问题:

  1. 似乎参数未正确传递到您的下一个转换中。您正在使用"将行复制到结果"步骤(来自日志)。检查参数是否正确定义。我假设您的下一个转换无法读取参数。您还可以阅读this

  2. 如果第1点是正确的,请尝试检查是否只有第二个转换正在执行而不实际执行整个作业。您手动输入参数,仅用于测试目的。我假设第二次转型的来源可能存在一些问题。

  3. 请检查。希望它有所帮助:)


    添加更多详情

    问题不在于使用任何特定步骤。使用microsoft excel输出或excel writer都可以正常工作。您需要了解的是使用"复制行来结果"。只需阅读上面的我的博客或pentaho wiki。它可能会有所帮助。

    你应该做什么(简而言之):: 进行2次转换>第一个ktr中的表输入和复制行>在第二个ktr使用excel编写器定义变量。 [注意:您需要在ktr设置中进行一些更改;我在博客中解释了]