title: Wildfly. FileNotFoundException (Access is denied)
body: <p>I have a new project, and I want to run Wildfly from Maven.
  Command: <code>mvn wildfly:run</code></p>
  
  <p>What I excpect to happen, is that maven will pack my project to a WAR file, start Wildfly, and then deploy it.</p>
  
  <p>The problem is that it works the first time I run it. It is downloading Wildfly, building and deploying the POM file. 
  If I stop Wildfly, and start it again with the same command, I get a FileNotFoundException and Access is denied message (se below). The strange thing is that I copied this small project over from another computer, where it works all the time. I also tried to make a new project, but still getting the same error.</p>
  
  <p>Exception:</p>
  
  <blockquote>
    <p>[INFO]
    ------------------------------------------------------------------------ [INFO] BUILD FAILURE [INFO]
    ------------------------------------------------------------------------ [INFO] Total time: 53.197 s [INFO] Finished at:
    2016-05-02T16:23:11+02:00 [INFO] Final Memory: 19M/212M [INFO]
    ------------------------------------------------------------------------ [ERROR] Failed to execute goal
    org.wildfly.plugins:wildfly-maven-plugin:1.1.0.Alpha7:run
    (default-cli) on project new-test: The server failed to start:
    Deployment failed: Operation failed: {"WFLYCTL0062: Composite
    operation faile d and was rolled back. Steps that failed:" =>
    {"Operation step-2" => {"WFLYCTL0080: Failed services" =>
    {"jboss.undertow.deployment.default-server.default-host./pg" =>
    "org.jboss.msc.service.StartException in service jboss.undert
    ow.deployment.default-server.default-host./pg:
    java.lang.RuntimeException: java.lang.RuntimeException:
    com.sun.faces.config.ConfigurationException:
    java.util.concurrent.ExecutionException: javax.faces.FacesException:
    java.io.File NotFoundException: D:\Skole\New
    folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp
    (Access is denied) [ERROR] Caused by: java.lang.RuntimeException:
    java.lang.RuntimeException:
    com.sun.faces.config.ConfigurationException:
    java.util.concurrent.ExecutionException: javax.faces.FacesException:
    java.io.FileNotFoundException: D:\Skole \New
    folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp
    (Access is denied) [ERROR] Caused by: java.lang.RuntimeException:
    com.sun.faces.config.ConfigurationException:
    java.util.concurrent.ExecutionException: javax.faces.FacesException:
    java.io.FileNotFoundException: D:\Skole\New folder\target\wildfl
    y-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp
    (Access is denied) [ERROR] Caused by:
    com.sun.faces.config.ConfigurationException:
    java.util.concurrent.ExecutionException: javax.faces.FacesException:
    java.io.FileNotFoundException: D:\Skole\New
    folder\target\wildfly-run\wildfly-10.0.0.Final\
    \standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp
    (Access is denied) [ERROR] Caused by:
    java.util.concurrent.ExecutionException: javax.faces.FacesException:
    java.io.FileNotFoundException: D:\Skole\New
    folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afb
    ab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp (Access
    is denied) [ERROR] Caused by: javax.faces.FacesException:
    java.io.FileNotFoundException: D:\Skole\New
    folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-3
    0131585882030325.tmp (Access is denied) [ERROR] Caused by: java.io.FileNotFoundException: D:\Skole\New
    folder\target\wildfly-run\wildfly-10.0.0.Final\standalone\tmp\vfs\temp\tempf818abf44afbab25\content-393c76ecb03dd1d6\content-30131585882030325.tmp
    (Access  is denied)"}}}} [ERROR] -> [Help 1] [ERROR] [ERROR] To see
    the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR] [ERROR] For more information about the errors and possible
    solutions, please read the following articles: [ERROR] [Help 1]
    <a href="http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException" rel="nofollow">http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException</a></p>
  </blockquote>
  
  <p>POM file:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  </code></pre>
  
  <p>http://maven.apache.org/xsd/maven-4.0.0.xsd">
      4.0.0</p>
  
  <pre><code>&lt;groupId&gt;new.test&lt;/groupId&gt;
  &lt;artifactId&gt;new-test&lt;/artifactId&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  
  &lt;dependencyManagement&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.jboss.spec&lt;/groupId&gt;
              &lt;artifactId&gt;jboss-javaee-7.0&lt;/artifactId&gt;
              &lt;version&gt;1.0.3.Final&lt;/version&gt;
              &lt;type&gt;pom&lt;/type&gt;
              &lt;scope&gt;import&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/dependencyManagement&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.eclipse.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;org.eclipse.persistence.moxy&lt;/artifactId&gt;
          &lt;version&gt;2.5.0&lt;/version&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;javax&lt;/groupId&gt;
          &lt;artifactId&gt;javaee-api&lt;/artifactId&gt;
          &lt;version&gt;7.0&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;junit&lt;/groupId&gt;
          &lt;artifactId&gt;junit&lt;/artifactId&gt;
          &lt;version&gt;4.12&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.glassfish.main.extras&lt;/groupId&gt;
          &lt;artifactId&gt;glassfish-embedded-all&lt;/artifactId&gt;
          &lt;version&gt;4.1.1&lt;/version&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
  
      &lt;!-- JEE for WildFly --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.faces&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-jsf-api_2.2_spec&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.ejb&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-ejb-api_3.2_spec&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.hibernate.javax.persistence&lt;/groupId&gt;
          &lt;artifactId&gt;hibernate-jpa-2.1-api&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.enterprise&lt;/groupId&gt;
          &lt;artifactId&gt;cdi-api&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.annotation&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-annotations-api_1.2_spec&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.spec.javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-servlet-api_3.1_spec&lt;/artifactId&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &lt;build&gt;
  
      &lt;finalName&gt;pg&lt;/finalName&gt;
  
  
      &lt;plugins&gt;
  
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.wildfly.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;wildfly-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;1.1.0.Alpha7&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;add-user&gt;
                      &lt;users&gt;
                          &lt;user&gt;
                              &lt;username&gt;admin&lt;/username&gt;
                              &lt;password&gt;admin&lt;/password&gt;
                          &lt;/user&gt;
                      &lt;/users&gt;
                  &lt;/add-user&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
          &lt;plugin&gt;
              &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;configuration&gt;
                  &lt;source&gt;1.8&lt;/source&gt;
                  &lt;target&gt;1.8&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
  
      &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>Anyone have any ideas? I'm running Windows 10 on both computers.</p>