title: java.io.IOException: The system cannot find the path specified
body: <p>On a particular server (Windows 2012 server R2) I am having trouble creating a temp file.  I get the following error everytime I try.</p>
  
  <pre><code>java.io.IOException: The system cannot find the path specified
  at java.io.WinNTFileSystem.createFileExclusively(Native Method)
  at java.io.File.createTempFile(Unknown Source)
  etc..
  </code></pre>
  
  <p>The error happens everytime the following code is ran:</p>
  
  <p><code>InputStream inputStream = portalBean.createPDF( sessionID, foCode );</code></p>
  
  <p>Things I have tried</p>
  
  <ol>
  <li><p>Changed the java.io.tmpdir variable on the fly.  <code>System.setProperty("java.io.tmpdir", "C:\\");</code> </p></li>
  <li><p>Added <code>-Djava.io.tmpdir=c:\\temp</code> to the webnetwork lax file to an unrestricted location.</p></li>
  <li><p>I tried setting the webNetwork service to run as a specified user with rights to temp files e.g. the Administrator.</p></li>
  <li><p>Made sure I have free disk space and I cleaned out the c:\windows\temp folder.</p></li>
  <li><p>Made sure the tmp environment variables were set to their default values.</p></li>
  <li><p>I also tried running the service from a command prompt which was opened with the <code>Run As Administrator</code> option.</p></li>
  </ol>
  
  <p>And the <code>IOException</code> lingers still.  I have another server running the same code without issue (Windows Server 2012).</p>
  
  <p>Does anyone else have any Ideas of what else I can try to resolve this issue?  And or any tips on how I can debug the issue more thoroughly to get a grasp of what is going on?</p>