Uploaded image for project: 'Confluence Server'
  1. Confluence Server
  2. CONFSERVER-20233

Error creating temporary file when uploading plugin

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Low
    • Resolution: Timed out
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Environment:

      Windows 7, local install, Tomcat 6.0.26 (accept all defaults), running selenium tests

    • Internal Complexity:
      3
    • Internal Value:
      2

      Description

      NOTE: This bug report is for Confluence Server. Using Confluence Cloud? See the corresponding bug report.

      When starting selenium tests, the first thing that's supposed to happen is that the framework tries to install a test helper plugin in confluence. Under Windows 7 with the default Tomcat settings, this plugin cannot be uploaded, which prevents all tests from running. It fails inside the native WinNTFileSystem code while trying to create a temp file under <TOMCAT HOME>/temp, probably due to Windows 7 Windows-on-Windows permissions differences (Tomcat is installed under Program Files, which is protected and files created/modified without elevated privileges are instead written to the c:\Users\<USER>\AppData\Local\VirtualStore of the active user).

      java.io.IOException: Access is denied
      at java.io.WinNTFileSystem.createFileExclusively(Native Method)
      at java.io.File.checkAndCreate(File.java:1345)
      at java.io.File.createTempFile(File.java:1434)

      The exception itself is a known JDK bug (see http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6325169) and has been open 5 years now, as it has occurred on various versions of Windows. We should seriously think about detecting this sort of failure and reporting it to the user, or even changing the default install settings of tomcat so it never tries to use a tempdir under Program Files.

      A workaround is to pass the JVM arg -Djava.io.tmpdir=c:\tmp (or some other unprotected dir) to tomcat.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  5 years, 8 weeks, 5 days ago