Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

java.io.IOException: Access is denied - writing on remote path

843833Jun 9 2008 — edited Sep 13 2010
Hi

Sorry if this question doesn't belong to this forum

I have a MVC project running with Ext-Js as Front tier, Struts and EJB in Back Tier. The problem is when i tried to create a new file over a path in our network, the code used for this operations is:
String outputFile = "\\\\192.168.2.231\\mgr\\attach\\reports\\";
File f = new File(outputFile + "tmpfile.pdf");
if(!f.exists())
   f.createNewFile();
//rest of code....
when I use Tomcat as container, there is no problem running this code, it creates file without problem, but when i use WebSphere, this error is throw:

SystemErr R java.io.IOException: Denied Access
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.createNewFile(File.java:851)
.......

I have configured remote folder without restrictions for being access through network, and it's in same domain as container....
I have tried to configure security in was.policy file when project EAR file is deployed, but I'm not sure if this is the reason of error....

anyone have an idea of what's is causing this error?

Regards
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 11 2010
Added on Jun 9 2008
4 comments
2,511 views