FileNotFoundException when the other machine goes to sleep
[A related thread, but likely a different cause, is at http://help.infinitekind.com/discussions/problems/162-two-users-on-...]
In my setup, I have a Windows machine and a Mac machine. I store the database on the Mac in a shared directory. Either machine can edit the data (but not at the same time, of course). No problem.
However, if I have the file open on the Windows machine and the Mac goes to sleep, when I try to save from the PC, I get a Java FileNotFoundException. Of course, that is to be expected, since the PC cannot find the file - the Mac is sleeping.
To deal with this constraint, I work for a while on the PC with the file open and before I attempt to save the file, I reach over to the Mac and wake it up, wait a few seconds, then press "save". I still get the FileNotFoundException. What is unusual is that I can pull up the Mac directory from within Moneydance and see the directory. So I know that the file can be found. When I try to save the current file (banking.md) over the original data file, I get that same error. So, I add a letter to the end of the filename (bankingx.md) and save it to that same directory, then later I hopefully remember to go back, delete the banking.md file and rename bankingx.md to banking.md.
It seems that that is too much work to ask of most users. I am happy to use software in beta testing mode, but not everyone is. What should happen is a graceful recovery - tell the user that the remote file is no longer available (a java exception message is not going to cut it in prime time, but I know how to deal with obscure references) and when the remote file is again available, remove (or refresh) the locks on the file, and set up so that the application can again overwrite the original file. Alternatively, save it as another name in such a way that the application can transparently rename the file.
Let me know if more details are needed. This is repeatable - however, just now while typing this the Mac went to sleep and I woke it up, and saving bankingx.md was allowed, without error.
I know, I COULD set the Mac to stay awake more, but that wastes energy and would just be masking an overly delicate file handling routing, IMHO.
Comments are currently closed for this discussion. You can start a new one.
Keyboard shortcuts
Generic
| ? | Show this help |
|---|---|
| ESC | Blurs the current field |
Comment Form
| r | Focus the comment reply box |
|---|---|
| ^ + ↩ | Submit the comment |
You can use Command ⌘ instead of Control ^ on Mac
1 Posted by Ben Spencer on 07 Jul, 2010 05:13 PM
Hi
The FileNotFoundException is thrown when the operating system reports that the file is not accessible. The windows file system on top of the network stack is reporting that the file is not present. While I understand that this is a problem for you I tend to think it is outside of the scope of the moneydance program to re-establish the broken network connection. I think it is the job of the operating system to periodically check for the presence or absence of network mount points not a user space application such as Moneydance. I think it is reasonable for Moneydance to make the assumption that the operating system is correctly reporting the presence of a file. You may find that if you write a batch file to map the network share to a drive letter and run that batch file you can bring the connection back up.
You may find that storing the file on a server that does not go to sleep would be a better solution. I have been using the free cloud service dropbox for a while now and have been very happy with it.
I am sorry if this does not meet your needs.
Sincerely
Ben Spencer
2 Posted by DavidRoss on 08 Jul, 2010 06:27 AM
Well, my point was not that it does not meet my needs, because I know
what it going on and can hack it just fine. My point was that you
will get other, less techie users who are making the transition from
Quicken to MD for the same reason I did - to support Macs and
PCs. They will run into this problem and you can choose to put up an
error message that is more directed to those users.
However, that is not a determining factor for me in using your
program. I just want to see you succeed. Also, I really should be
using a non-sleeping server, so that I don't have to wake the other
computer periodically.
Angie Rauscher closed this discussion on 24 Jul, 2011 07:58 PM.