Hitachi Vantara Pentaho Community Forums
Results 1 to 7 of 7

Thread: "Could not delete tmp-file"

  1. #1
    Join Date
    Apr 2012
    Posts
    10

    Question "Could not delete tmp-file"

    I have some transformations that usually runs quite well and do what they should do.

    From time to time, however, the transformations stop and I get the following errormessage:

    Code:
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : Could not delete "file:///C:/Users/username/AppData/Local/Temp/2/out2_a6c205d1-f8f3-11e1-a2d1-8541be88437f.tmp".
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) : org.apache.commons.vfs.FileSystemException: Could not delete "file:///C:/Users/username/AppData/Local/Temp/2/out2_a6c205d1-f8f3-11e1-a2d1-8541be88437f.tmp".
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :     at org.apache.commons.vfs.provider.AbstractFileObject.deleteSelf(Unknown Source)
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :     at org.apache.commons.vfs.provider.AbstractFileObject.delete(Unknown Source)
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :     at org.apache.commons.vfs.provider.AbstractFileObject.delete(Unknown Source)
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :     at org.pentaho.di.trans.steps.sort.SortRows.clearBuffers(SortRows.java:501)
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :     at org.pentaho.di.trans.steps.sort.SortRows.dispose(SortRows.java:472)
    2012/09/07 15:55:16 - Sort db_oxid.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:69)
    2012/09/07 15:55:16 - Sort db_oxid.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)
    2012/09/07 15:55:16 - Sort db_oxid.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: Could not delete "C:\Users\username\AppData\Local\Temp\2\out2_a6c205d1-f8f3-11e1-a2d1-8541be88437f.tmp".
    2012/09/07 15:55:16 - Sort db_oxid.0 - ERROR (version 4.2.1-stable, build 15952 from 2011-10-25 15.27.10 by buildguy) :     at org.apache.commons.vfs.provider.local.LocalFile.doDelete(Unknown Source)
    If I restart the Transformation, this happens again, even if I delete the file manually. It seems to me that Spoon creates the temp-file and is then unable to delete it.

    If I restart the computer everything works fine again. For some time.

    The machine runs Windows Server 2008 R2

    Any ideas? Thanks in advance.

  2. #2
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Are you running some backup or some other program that might keep the file locked?

  3. #3
    Join Date
    Apr 2012
    Posts
    10

    Default

    I already checked that with process explorer but nothing else seemed to have a lock on the file (not even Kettle).

    It seems to me that Kettle itself does not release the file. I did some testing and if I close Kettle and wait approx. 20 Minutes, the file can be deleted. This behaviour is reproducable, I tried that on some occasions and it worked.

    But as the jobs where this happens runs timed and unattended this can be very annoying.

  4. #4
    Join Date
    Nov 1999
    Posts
    9,729

    Default

    Stranger things have happened. Maybe if we could reproduce it somehow we could fix it.

  5. #5
    Join Date
    Apr 2012
    Posts
    10

    Default

    I would be happy to supply you with further information that could help you to reproduce this problem at your end.

    I am quite clear about the fact, that something like this may be caused by a local configuration or compatibility problem - and something like is probably quite hard to track down ... but I hoped that maybe someone had already encountered something like this.

  6. #6
    Join Date
    Aug 2012
    Posts
    16

    Default

    Hi

    I was having the same problem. Found the cause of this problem in my scenario.
    The problem is that I am using Modified java script step to validate my text file (I open it , read the lines and do the validation). forgot to close it. Because of this I was not able to delete the file. After closing the file in Modified Java script ( filehandle.close(), now I am able to delete the file

    So please check you have the file opened but not closed some where in middle of your job.

    Thanks,
    Thana

  7. #7
    Join Date
    Sep 2012
    Posts
    10

    Default

    HI,
    from Windows temp folder you can't delete all the files until you close all the applications, when you open a document it creates a temp file in the temp folder if open spoon also it creates a temp file in the temp folder, as long as all these application are open you can't delete the temp files. by closing all the applications documents on your system and try to run this transformation from a command prompt and try how it behaviors

    Good Luck.

Tags for this Thread

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.