Hitachi Vantara Pentaho Community Forums
Results 1 to 10 of 10

Thread: Excel Template Issue - 3.0.1

  1. #1
    Join Date
    Jan 2006
    Posts
    25

    Default Excel Template Issue - 3.0.1

    When using and Excel output with a template, the transformation throws a NullPointerException (See below..) and complains about not being able to close the file.

    The output file generates fine and it uses the template structurally (cell sizes etc) however the fonts colors etc. stored in the template are lost.

    The 'experimental' check box for the template option in Excel Output step has been removed in the 3.X.X versions, does that mean this should be reported as a bug?


    2007/12/29 23:57:52 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : java.lang.NullPointerException
    2007/12/29 23:57:52 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.closeFile(ExcelOutput.java:494)
    2007/12/29 23:57:52 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.dispose(ExcelOutput.java:555)
    2007/12/29 23:57:52 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.run(ExcelOutput.java:579)

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    Give us a small example that shows your problem.

    Regards,
    Sven

  3. #3
    Join Date
    Aug 2007
    Posts
    1

    Default Excel Template - Same problem here

    hi,
    we fill an excel template with 5 (five) Columns and the template contains 1 (one) sheet with the Column headers . No graphics etc. Not to forget that the Option "Append to Template" is Checked! The File is created from the template and filled properly but the above mentioned NullPointer exception is thrown.

    thx
    A. Jernejcic

    following an excerpt of the log:
    2008/01/15 15:12:34 - Insert/Update HRK Statusmail.0 - Startet die Durchführung...
    2008/01/15 15:12:34 - sammeln Daten.0 - Finished reading query, closing connection.
    2008/01/15 15:12:34 - sammeln Daten.0 - Bearbeitung abgeschlossen (I=26, O=0, R=0, W=52, U=0, E=0
    2008/01/15 15:12:34 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : Unable to close openFile file
    2008/01/15 15:12:34 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : java.lang.NullPointerException
    2008/01/15 15:12:34 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.closeFile(ExcelOutput.java:494)
    2008/01/15 15:12:34 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.dispose(ExcelOutput.java:555)
    2008/01/15 15:12:34 - Excel Output.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.run(ExcelOutput.java:579)
    2008/01/15 15:12:34 - Excel Output.0 - Bearbeitung abgeschlossen (I=0, O=26, R=26, W=26, U=0, E=1
    2008/01/15 15:12:34 - Insert/Update HRK Statusmail.0 - Bearbeitung abgeschlossen (I=26, O=0, R=26, W=26, U=0, E=0

  4. #4
    Join Date
    May 2006
    Posts
    4,882

    Default

    File a JIRA at http://jira.pentaho.org/browse/PDI I remember a similar bug in text file output a long time ago, it's a "cleanup" mistake.

    Regards,
    Sven

  5. #5
    Join Date
    Jan 2008
    Posts
    1

    Default Has this issue being Resolved in latest version?

    has this issue being resolve in the newer version of Kettle? I am using Version 3.0.1.

    Here are my error message:

    2009/01/20 11:08:48 - ${INPUT_DIR}\RX_REC_COUNT\COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : Unable to close openFile file
    2009/01/20 11:08:48 - ${INPUT_DIR}\RX_REC_COUNT\COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : java.lang.NullPointerException
    2009/01/20 11:08:48 - ${INPUT_DIR}\RX_REC_COUNT\COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.closeFile(ExcelOutput.java:494)
    2009/01/20 11:08:48 - ${INPUT_DIR}\RX_REC_COUNT\COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.dispose(ExcelOutput.java:555)
    2009/01/20 11:08:48 - ${INPUT_DIR}\RX_REC_COUNT\COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - ERROR (version 3.0.1, build 534 from 2007/12/12 12:28:23) : at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.run(ExcelOutput.java:579)
    2009/01/20 11:08:48 - ${INPUT_DIR}\RX_REC_COUNT\COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - Finished processing (I=0, O=30, R=30, W=30, U=0, E=1)
    2009/01/20 11:08:48 - prod_step11_COMPARE_IMS_ROW_CNT_VS_ALGN_SUMMED.0 - Finished processing (I=0, O=30, R=30, W=30, U=0, E=0)
    2009/01/20 11:08:48 - Spoon - The transformation has finished!!


  6. #6
    Join Date
    Jul 2009
    Posts
    3

    Default similiar problem in 3.2.0 using pan.sh

    transformation reads data from a database and outputs excel file using a excel_template.

    Using spoon.sh everything is fine.
    Using pan.sh the output excel file is created as an empty file and the following messages appear:

    $ sh pan.sh -file:/d2/httpd/csatest/Lagerliste.ktr -param:likeArtikelNummer=NJUBO -param:bisLagerplatz=ZZZZZZZZZZ -param:vonLetzterZugang=2008-01-01 -param:bisLetzterZugang=2008-12-31 -param:vonLetzterAbgang=2008-01-01 -param:bisLetzterAbgang=2008-12-31 -param:vonBestand=0.001 -param:bisBestand=9999999999.999
    INFO 21-07 08:48:21,020 - Pan - Start of run.
    INFO 21-07 08:48:24,347 - Using "/tmp/vfs_cache" as temporary files store.
    INFO 21-07 08:48:25,023 - Lagerliste - Dispatching started for transformation [Lagerliste]
    INFO 21-07 08:48:25,046 - Lagerliste - This transformation can be replayed with replay date: 2009/07/21 08:48:25
    INFO 21-07 08:48:26,192 - Lagerliste Selektieren.0 - Finished reading query, closing connection.
    ERROR 21-07 08:48:26,258 - Excel Ausgabe.0 - Unable to close openFile file : file:///JSTAB/csatest/Lagerliste2009-07-21.xls
    ERROR 21-07 08:48:26,258 - Excel Ausgabe.0 - java.lang.NullPointerException
    at java.lang.System.arraycopy(Native Method)
    at jxl.read.biff.File.read(File.java:220)
    at jxl.read.biff.Record.getData(Record.java:117)
    at jxl.biff.PaletteRecord.getData(PaletteRecord.java:105)
    at jxl.biff.WritableRecordData.getBytes(WritableRecordData.java:71)
    at jxl.write.biff.File.write(File.java:147)
    at jxl.write.biff.WritableWorkbookImpl.write(WritableWorkbookImpl.java:802)
    at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.closeFile(ExcelOutput.java:576)
    at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.dispose(ExcelOutput.java:650)
    at org.pentaho.di.trans.step.BaseStep.runStepThread(BaseStep.java:2918)
    at org.pentaho.di.trans.steps.exceloutput.ExcelOutput.run(ExcelOutput.java:665)

    INFO 21-07 08:48:26,259 - Excel Ausgabe.0 - Finished processing (I=0, O=0, R=0, W=0, U=0, E=1)
    INFO 21-07 08:48:26,260 - Lagerliste - Transformation detected one or more steps with errors.
    INFO 21-07 08:48:26,260 - Lagerliste - Transformation is killing the other steps!
    INFO 21-07 08:48:26,263 - Pan - Finished!
    INFO 21-07 08:48:26,263 - Pan - Start=2009/07/21 08:48:24.788, Stop=2009/07/21 08:48:26.263
    INFO 21-07 08:48:26,264 - Pan - Processing ended after 1 seconds.

    $ ls -l /JSTAB/csatest/Lagerliste2009-07-21.xls
    -rw-r--r-- 1 brb brb 0 2009-07-21 08:48 /JSTAB/csatest/Lagerliste2009-07-21.xls

  7. #7
    Join Date
    Jul 2009
    Posts
    3

    Default similiar problem in 3.2.0 using pan.sh (more...)

    it's not a pan.sh problem. Same result using spoon.sh on a particular machine. Different hardware, same OS (incl. version ubuntu 9.04) works fine.

  8. #8
    Join Date
    Feb 2009
    Posts
    296

    Default

    do you watch the Excel file by keeping it opened in some program? This gave me a bunch of errors one time.
    Fabian,
    doing ETL with his hands bound on his back

  9. #9
    Join Date
    Jul 2009
    Posts
    3

    Default

    no, file is not open; Tried to use a different name and got the same results. File is created and has zero Bytes after execution.

    Additional Information: If no Template is used, transformation runs as expected. Do difference between output- and/or template file is in a local filesystem or in a mounted external cifs file system.
    Last edited by brb6708; 07-27-2009 at 08:57 AM.

  10. #10

    Default

    Sorry for bringing up a thread so old, but I've been getting this error recently and maybe in the future someone can find this useful.

    I was getting also this NullPointerException at org.pentaho.di.trans.steps.exceloutput.ExcelOutput .closeFile

    In my case, the problem was gone after checking the property Do not create file at start in the ExcelOutput step.

    The problem was indeed quite weird. Scenario is executing a PDI job from BI server through an xaction (PDI 3.2.0, BI server 3.5.2). This job includes a transformation that retrieves data from a TableInput step and writes it to an ExcelOutput step (no templates, no graphs, just dumping data). Strangely, for some values the process was failing with this NullPointerException. At some point, it seems that the server is keeping a stream opened to the file, although the file is indeed empty. This can be checked easily, since you cannot delete the file (OS claims is in use), but if the server is stopped, then is possible to do it. Even more strange, the server IT IS able to delete it, since I could run a 'bad process' and after that a 'good process', and the file would be overwritten.

    It looks clear to me that is a problem with the data, since the exception was arising with certain values, but not with others, but since I was able to find this workaround, I didn't try to look deeper the source of the problem. Hopefully it'll work too for other people

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.