4 Replies Latest reply: Sep 13, 2010 9:24 AM by 843833 RSS

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


      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 = "\\\\\\mgr\\attach\\reports\\";
      File f = new File(outputFile + "tmpfile.pdf");
      //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?