Wildfly fails to deploy application (FileNotFoundException - Access is Denied)
Asked Answered
G

4

12
  • Wildfly 8.2.0.Final
  • JDK 8 Update 60
  • Eclipse Mars Update 1
  • JBoss Tools 4.3.0.Final
  • Windows 10

Recently I upgraded the following things:

  • from Windows 7 to Windows 10
  • from Eclipse Mars to Eclipse Mars Update 1
  • from JBoss Tools 4.3.0.Beta1 to JBoss Tools 4.3.0.Final

and now when I try to deploy my application in Eclipse it doesn't work anymore (sometimes it works, but most of the time it doesn't work). Everything was working fine before the upgrades, but now I get this stack trace when I deploy the application (where you read "Acesso negado" below it means "Access is Denied"):

13:18:12,452 SEVERE [javax.faces] (MSC service thread 1-7) Unable to obtain InjectionProvider from init time FacesContext. Does this container implement the Mojarra Injection SPI?
13:18:12,452 SEVERE [javax.faces] (MSC service thread 1-7) Unable to call @PreDestroy annotated methods because no InjectionProvider can be found. Does this container implement the Mojarra Injection SPI?
13:18:12,452 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (MSC service thread 1-7) Critical error during deployment: : com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:752) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:349) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193) [undertow-servlet-1.1.0.Final.jar:1.1.0.Final]
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at java.util.concurrent.FutureTask.report(FutureTask.java:122) [rt.jar:1.8.0_60]
  at java.util.concurrent.FutureTask.get(FutureTask.java:192) [rt.jar:1.8.0_60]
  at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:739) [jsf-impl-2.2.8-jbossorg-1.jar:]
  ... 11 more
Caused by: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:135) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1308) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1277) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_60]
  at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:730) [jsf-impl-2.2.8-jbossorg-1.jar:]
  ... 11 more
Caused by: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at java.io.FileInputStream.open0(Native Method) [rt.jar:1.8.0_60]
  at java.io.FileInputStream.open(FileInputStream.java:195) [rt.jar:1.8.0_60]
  at java.io.FileInputStream.<init>(FileInputStream.java:138) [rt.jar:1.8.0_60]
  at org.jboss.vfs.spi.RealFileSystem$1.run(RealFileSystem.java:107) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.spi.RealFileSystem$1.run(RealFileSystem.java:105) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_60]
  at org.jboss.vfs.spi.RealFileSystem.doIoPrivileged(RealFileSystem.java:87) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.spi.RealFileSystem.openInputStream(RealFileSystem.java:105) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:258) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualJarInputStream.openCurrent(VirtualJarInputStream.java:227) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualJarInputStream.getNextJarEntry(VirtualJarInputStream.java:113) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualJarInputStream.getNextEntry(VirtualJarInputStream.java:84) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at com.sun.faces.facelets.util.Classpath.searchFromURL(Classpath.java:221) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.facelets.util.Classpath.searchFromURL(Classpath.java:241) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.facelets.util.Classpath.search(Classpath.java:155) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.facelets.util.Classpath.search(Classpath.java:109) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.loadURLs(MetaInfFacesConfigResourceProvider.java:164) [jsf-impl-2.2.8-jbossorg-1.jar:]
  at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:108) [jsf-impl-2.2.8-jbossorg-1.jar:]
  ... 15 more


13:18:12,454 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./gruposemailservidores: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./gruposemailservidores: Failed to start service
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
  at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_60]
  at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_60]
  at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_60]
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:222)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:87)
  at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:72)
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
  at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.2.Final.jar:1.2.2.Final]
  ... 3 more
Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:280)
  at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
  at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:193)
  ... 7 more
Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:752)
  at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:349)
  at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:221)
  ... 9 more
Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at java.util.concurrent.FutureTask.report(FutureTask.java:122) [rt.jar:1.8.0_60]
  at java.util.concurrent.FutureTask.get(FutureTask.java:192) [rt.jar:1.8.0_60]
  at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:739)
  ... 11 more
Caused by: javax.faces.FacesException: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:135)
  at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1308)
  at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1277)
  at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_60]
  at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:730)
  ... 11 more
Caused by: java.io.FileNotFoundException: C:\wildfly\standalone\tmp\vfs\temp\temp4de141261078fbde\gruposemailservidores.war-18ba5e3d2b4062a2\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
  at java.io.FileInputStream.open0(Native Method) [rt.jar:1.8.0_60]
  at java.io.FileInputStream.open(FileInputStream.java:195) [rt.jar:1.8.0_60]
  at java.io.FileInputStream.<init>(FileInputStream.java:138) [rt.jar:1.8.0_60]
  at org.jboss.vfs.spi.RealFileSystem$1.run(RealFileSystem.java:107) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.spi.RealFileSystem$1.run(RealFileSystem.java:105) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_60]
  at org.jboss.vfs.spi.RealFileSystem.doIoPrivileged(RealFileSystem.java:87) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.spi.RealFileSystem.openInputStream(RealFileSystem.java:105) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:258) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualJarInputStream.openCurrent(VirtualJarInputStream.java:227) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualJarInputStream.getNextJarEntry(VirtualJarInputStream.java:113) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at org.jboss.vfs.VirtualJarInputStream.getNextEntry(VirtualJarInputStream.java:84) [jboss-vfs-3.2.5.Final.jar:3.2.5.Final]
  at com.sun.faces.facelets.util.Classpath.searchFromURL(Classpath.java:221)
  at com.sun.faces.facelets.util.Classpath.searchFromURL(Classpath.java:241)
  at com.sun.faces.facelets.util.Classpath.search(Classpath.java:155)
  at com.sun.faces.facelets.util.Classpath.search(Classpath.java:109)
  at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.loadURLs(MetaInfFacesConfigResourceProvider.java:164)
  at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:108)
  ... 15 more


13:18:12,460 ERROR [org.jboss.as.controller.management-operation] (DeploymentScanner-threads - 2) JBAS014613: Operation ("full-replace-deployment") failed - address: ([]) - failure description: {"JBAS014671: Failed services" => {"jboss.undertow.deployment.default-server.default-host./gruposemailservidores" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./gruposemailservidores: Failed to start service
    Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly\\standalone\\tmp\\vfs\\temp\\temp4de141261078fbde\\gruposemailservidores.war-18ba5e3d2b4062a2\\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
    Caused by: java.lang.RuntimeException: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly\\standalone\\tmp\\vfs\\temp\\temp4de141261078fbde\\gruposemailservidores.war-18ba5e3d2b4062a2\\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
    Caused by: com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly\\standalone\\tmp\\vfs\\temp\\temp4de141261078fbde\\gruposemailservidores.war-18ba5e3d2b4062a2\\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
    Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly\\standalone\\tmp\\vfs\\temp\\temp4de141261078fbde\\gruposemailservidores.war-18ba5e3d2b4062a2\\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
    Caused by: javax.faces.FacesException: java.io.FileNotFoundException: C:\\wildfly\\standalone\\tmp\\vfs\\temp\\temp4de141261078fbde\\gruposemailservidores.war-18ba5e3d2b4062a2\\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)
    Caused by: java.io.FileNotFoundException: C:\\wildfly\\standalone\\tmp\\vfs\\temp\\temp4de141261078fbde\\gruposemailservidores.war-18ba5e3d2b4062a2\\gruposemailservidores.war-3630318317622662798.tmp (Acesso negado)"}}
13:18:12,527 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018565: Replaced deployment "gruposemailservidores.war" with deployment "gruposemailservidores.war"
13:18:12,528 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.persistenceunit."gruposemailservidores.war#ufca" (unavailable) dependents: [service jboss.deployment.unit."gruposemailservidores.war".deploymentCompleteService]
JBAS014777:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./gruposemailservidores
      service jboss.undertow.deployment.default-server.default-host./gruposemailservidores: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./gruposemailservidores: Failed to start service

I've already checked the Windows permissions to the folder referenced above and it seems that everything is fine.

P.S.: Cross-posted: https://developer.jboss.org/thread/263854

Gnathonic answered 15/10, 2015 at 16:54 Comment(8)
Have you run eclipse as administrator?Schutt
My user account in Windows is an administrator account.Gnathonic
doesn't matter. You are only running a program as administrator when you specifically start it that way.Schutt
Before the upgrade everything worked fine even without running Eclipse as an administrator. If I try to run as one in Eclipse I will need to install all plugins again. I wouldn't like to take this route to solve this problem, because I think it's not related to this.Gnathonic
then try giving permissions to C:\wildfly\ to EveryoneEgwin
Just gave permissions to Everyone and it didn't work.Gnathonic
You dont have to reinstall all plugins when you run as administrator o.OSchutt
I've also just runned Eclipse as an administrator and it also didn't work. Same problem.Gnathonic
P
6

Access denied errors may also be provoked by Windows Defender's Real Time Protection. Add the Wildfly folder to the Defender's list of exclusions.

Paulson answered 20/10, 2016 at 11:59 Comment(0)
A
5

If you are not using JSF Framework, you can remove these lines from your configuration (standalone.xml):

<extension module="org.jboss.as.jsf"/> 

And

<subsystem xmlns="urn:jboss:domain:jsf:1.0"/>

For me, it solved the issue.

Adequate answered 3/4, 2016 at 21:35 Comment(3)
Worked for me as well and should be the accepted answer.Eustis
@Eustis and Joao, can you elaborate more on this option ? Even if this solves the issue, I want to know why this is happening.Vanpelt
@SuhasD: I am really sorry, but after 5 years I don't remember the exact cause anymore. Also, this must have been WildFly 10.0.0.Final at best...I would suspect that current releases (e.g. most recent 23.0.0.Final) could behave differently.Eustis
S
2

Windows "Access Denied" error is not only associated with lack of privileges but also with exclusive lock acquired by another process. You should check what process locks your files. You can use "Unlock" program for this task. In my case antivirus locked temporary files.

Steric answered 1/12, 2015 at 16:27 Comment(0)
S
0

I was using IntelliJ with JBoss EAP and it failed like your error (Access Denied). So I turned off my virus protection (MSE), problem was solved.

Should answered 2/12, 2016 at 14:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.