We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Error in saving a Document (FileNotFound)

Hello,


Maybe it looks strange, but I have a simple error which happens only once is a while, and not at the same point. The scenario is the following:
- I have a multiple documents, which I concatenate, I insert a watermark before
- After the concatenation I do in addition multiple text replacement.
After each operation I do a “save” on the document. Sometimes the save operation throws the following exception:
java.io.FileNotFoundException: D:\temp\template_20140523_111001.docx (Access is denied)
at java.io.RandomAccessFile.open(Native Method)
at java.io.RandomAccessFile.(RandomAccessFile.java:241)
at java.io.RandomAccessFile.(RandomAccessFile.java:122)
at asposewobfuscated.zz1Y.(Unknown Source)
at asposewobfuscated.zz1Y.(Unknown Source)
at asposewobfuscated.zz1Y.(Unknown Source)
at asposewobfuscated.zz1Y.(Unknown Source)
at asposewobfuscated.zz3T.(Unknown Source)
at asposewobfuscated.zz3V.zzWK(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
at com.aspose.words.Document.save(Unknown Source)
Although we can see the file on the disk… Do you have any idea what could be the cause? What could cause the save to fail? Would be a problem if I have the document created/loaded at the beginning and on the same document I do all the operations? Is it necessary a reload/re-instantiation on the document?

Thank you,
Laura

Hi Laura,


Thanks for your inquiry.

There should be no problems i.e. you can load a Word document into Aspose.Words’ DOM in memory and perform as many operations on it as you like, and save it at the end. What version of Aspose.Words for Java are you currently using? Can you please upgrade to latest version 14.4.0 and see how it goes on your end?
http://www.aspose.com/community/files/72/java-components/aspose.words-for-java/default.aspx

In case the problem still remains, please attach the following resources here for testing:

  • Your sample Word documents you’re performing these operations on.
  • Please create a standalone (runnable) Java application that helps us reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we’ll start investigation into your issues and provide you more information.

Best regards,

Hi awais.hafeez is not online. Last active: 05-27-2014, 5:28 AMAwais,


I have the Aspose.Words version 14.4.1. The main issue is that the error happens only once in a while, so I cannot reproduce it any time. Meanwhile I have removed some of the intermediary saves and the error didn’t appear yet. Hope that this was the problem. I’ll come back with details.

Thank you,
Laura

Hi Laura,


Thanks for your inquiry. Please note that 14.4.1 is a hotfix release which is only meant for a particular few customers who required it. Therefore, we strongly recommend you use the official 14.4.0 release of Aspose.Words for Java. Please let us know if we can be of any further assistance.

Best regards,