>> Also, "file not found" is not the same as "access denied". You should
>> post the exact error line(s) from your log.
>A bit off-topic, but wanted to jump in and clear this up, as the Java error
>messages are somewhat misleading.
>If I write a class to open a read-only file with java.io.FileOutputStream, I
>will see this stack trace
>calder@stimpy:~/bin> ./jdk180-221/bin/java AccessDenied
>java.io.FileNotFoundException: tester.txt (Permission denied)
at java.io.FileOutputStream.open0(Native Method) ...
>calder@stimpy:~/bin> ls -l tester.txt
>-r--r--r-- 1 calder users 0 Jun 9 10:12 tester.txt
>FileOutputStream ctors and methods throw the FileNotFoundException and the
>more specific error [in this case] is "Permission denied".
>So yea, it's confusing.
>If you check the source code for FileNotFoundException, we even see a comment
>related to this [quote] This exception will be thrown by the {@link
>FileInputStream}, {@link FileOutputStream}, and {@link RandomAccessFile}
>constructors when a file with the >specified pathname does not exist. It
>will also be thrown by these constructors if the file does exist but for some
>reason is inaccessible, for example when an attempt is made to open a
>read-only file for writing.
>[/quote]
I agree it is confusing. In my case, the error thrown from Java 'new
FileOutputStream(file)' is:
java.io.FileNotFoundException: <path to file> (Access is denied)
Since the file exists and is readable (per Java checks), I assumed the 'for
some reason is inaccessible' meant the file was opened somewhere else. But it
seems it may actually be the default Tomcat user having less privileges.
This email and any attachments are intended solely for the use of the
individual or entity to whom it is addressed and may be confidential and/or
privileged.
If you are not one of the named recipients or have received this email in error,
(i) you should not read, disclose, or copy it,
(ii) please notify sender of your receipt by reply email and delete this email
and all attachments,
(iii) Dassault Systèmes does not accept or assume any liability or
responsibility for any use of or reliance on this email.
Please be informed that your personal data are processed according to our data
privacy policy as described on our website. Should you have any questions
related to personal data protection, please contact 3DS Data Protection Officer
at [email protected]<mailto:[email protected]>
For other languages, go to https://www.3ds.com/terms/email-disclaimer