我在Ububntu 14.04上使用PDI 4.4.0:
uname -a:
Linux LT0124 3.13.0-24-generic #47-Ubuntu SMP Fri May 2 23:30:00 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
当我尝试使用Microsoft Excel Writer生成Excel文件时,我收到以下错误:
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Unexpected error
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : org.pentaho.di.core.exception.KettleException:
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : org.apache.commons.vfs.FileSystemException: File closed.
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : File closed.
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) :
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.pentaho.di.trans.steps.excelwriter.ExcelWriterStep.closeOutputFile(ExcelWriterStep.java:225)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.pentaho.di.trans.steps.excelwriter.ExcelWriterStep.processRow(ExcelWriterStep.java:172)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.pentaho.di.trans.step.RunThread.run(RunThread.java:50)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at java.lang.Thread.run(Thread.java:745)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : Caused by: org.apache.commons.vfs.FileSystemException: File closed.
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.apache.commons.vfs.util.MonitorOutputStream.assertOpen(Unknown Source)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.apache.commons.vfs.util.MonitorOutputStream.flush(Unknown Source)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:141)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at java.io.FilterOutputStream.close(FilterOutputStream.java:158)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : at org.pentaho.di.trans.steps.excelwriter.ExcelWriterStep.closeOutputFile(ExcelWriterStep.java:223)
2014/05/07 23:39:26 - Microsoft Excel Writer.0 - ERROR (version 4.4.0-stable, build 17588 from 2012-11-21 16.02.21 by buildguy) : ... 3 more
当我在Ubuntu 12.04和其他机器上尝试失败的步骤时,一切都很好。我确定问题出在我的新Ubuntu 14.04版本上,也许它与我使用的最新java版本有关:
java -version java版" 1.8.0_05" Java(TM)SE运行时环境(版本1.8.0_05-b13) Java HotSpot(TM)64位服务器VM(内置25.5-b02,混合模式)
你知道可能是什么原因吗?
答案 0 :(得分:2)
这是使用Java 8和写入XLSX文件的Excel Writer步骤的已知错误。您必须降级到Java 7或6,直到它被修复。
答案 1 :(得分:0)
根据this,根据任务配置,您的问题可能是使用的excel文件版本不同于它应该是的。
答案 2 :(得分:0)
正如上面Dave所述,除了Java RE版本之外,问题与.xlsx格式明确相关。
因此,如果您并不真正依赖.xlsx格式的任何内容,则可能更容易切换到2007之前版本的Excel格式,即.xls扩展名。对我来说(运行Ubuntu 15.04与OpenJDK RE构建1.8.0_45-internal-b14)它可以正常使用.xls格式,但无法使用.xlsx