This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jun 7, 2017, 5:00 PM
1 Posts

Deleting an extracted file from the OS after processing

  • Category: Application Development
  • Platform: Windows
  • Release: 9.0.1
  • Role: Developer
  • Tags: java,agent
  • Replies: 2

I have a java agent in a mail-in database set to run after new mail arrives.  The agent will extract the attached file to the server OS, process it accordingly and then remove the file from the OS.  All is working except the "remove the file from the OS" part at the end of my agent.  

I call .extractFile on my embedded object and process the file.  When i'm done, i get a handle to the file with 
File myFile = new File(strFilePath);

then call

myFile.delete();

but the file is still there. If i navigate to the file in explorer and try to delete it, i get the message "File In Use: The action can't be completed because the file is open in namgr.exe".

How can I delete the file from the OS?

 

Mike 

Jun 7, 2017, 8:28 PM
326 Posts
Question

If you open the file for processing are you closing the file stream? 

 

The windows accounts the the domino server is running under needs delete rights to the directory that the file is in.

Jun 23, 2017, 5:01 AM
21 Posts
Make sure you're recycling all your Domino objects

The message indicates the Agent Manager task still has a lock on the file.  Make sure you are correctly recycling all the Domino objects in the Java agent:

* Documents

* EmbeddedObjects

* Views

* Databases

* etc.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal