wildfly9.0.1.Final中的热部署引发错误

时间:2015-09-18 01:41:46

标签: java spring jboss wildfly

我在我的app(spring,hibernate)部署中使用wildfly-9.0.1.Final。

如果我将它放在所需的文件夹中,然后启动应用服务器,该应用就可以正常部署。但是,如果我尝试进行热部署,那么我经常会收到以下错误

2015-09-18 11:27:11,710 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC
service thread 1-1) WFLYJCA0018: Started Driver service with driver-name = abc.war_com.mysql.jdbc.Driver_5_1
2015-09-18 11:27:12,901 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 91) Initializing Mojarra 2.2.11-jbossorg-1 20150505-1501 for context '/abc'
2015-09-18 11:27:12,933 SEVERE [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 91) Critical error during deployment: : com.sun.faces.config.ConfigurationException: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: G:\wildfly-9.0.1.Final\standalone\tmp\vfs\temp\tempcca6b82fbbb1b290\content-9caf3814215c1a2e\content-3791740010714739653.tmp (Access is denied)
    at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:764)
    at com.sun.faces.config.ConfigManager.initialize(ConfigManager.java:353)
    at com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.java:227)
    at io.undertow.servlet.core.ApplicationListeners.contextInitialized(ApplicationListeners.java:173)
    at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:195)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)
    at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:745)
    at org.jboss.threads.JBossThread.run(JBossThread.java:320)
Caused by: java.util.concurrent.ExecutionException: javax.faces.FacesException: java.io.FileNotFoundException: G:\wildfly-9.0.1.Final\standalone\tmp\vfs\temp\tempcca6b82fbbb1b290\content-9caf3814215c1a2e\content-3791740010714739653.tmp (Access is denied)
    at java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.util.concurrent.FutureTask.get(FutureTask.java:188)
    at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:751)
    ... 12 more
Caused by: javax.faces.FacesException: java.io.FileNotFoundException: G:\wildfly-9.0.1.Final\standalone\tmp\vfs\temp\tempcca6b82fbbb1b290\content-9caf3814215c1a2e\content-3791740010714739653.tmp (Access is denied)
    at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:137)
    at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1360)
    at com.sun.faces.config.ConfigManager$URITask.call(ConfigManager.java:1329)
    at java.util.concurrent.FutureTask.run(FutureTask.java:262)
    at com.sun.faces.config.ConfigManager.getConfigDocuments(ConfigManager.java:742)
    ... 12 more
Caused by: java.io.FileNotFoundException: G:\wildfly-9.0.1.Final\standalone\tmp\vfs\temp\tempcca6b82fbbb1b290\content-9caf3814215c1a2e\content-3791740010714739653.tmp (Access is denied)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:146)
    at org.jboss.vfs.spi.RealFileSystem$1.run(RealFileSystem.java:111)
    at org.jboss.vfs.spi.RealFileSystem$1.run(RealFileSystem.java:109)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.jboss.vfs.spi.RealFileSystem.doIoPrivileged(RealFileSystem.java:91)
    at org.jboss.vfs.spi.RealFileSystem.openInputStream(RealFileSystem.java:109)
    at org.jboss.vfs.VirtualFile.openStream(VirtualFile.java:254)
    at org.jboss.vfs.VirtualJarInputStream.openCurrent(VirtualJarInputStream.java:223)
    at org.jboss.vfs.VirtualJarInputStream.getNextJarEntry(VirtualJarInputStream.java:109)
    at org.jboss.vfs.VirtualJarInputStream.getNextJarEntry(VirtualJarInputStream.java:96)
    at org.jboss.vfs.VirtualJarInputStream.getNextEntry(VirtualJarInputStream.java:80)
    at com.sun.faces.facelets.util.Classpath.searchFromURL(Classpath.java:222)
    at com.sun.faces.facelets.util.Classpath.searchFromURL(Classpath.java:242)
    at com.sun.faces.facelets.util.Classpath.search(Classpath.java:156)
    at com.sun.faces.facelets.util.Classpath.search(Classpath.java:110)
    at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.loadURLs(MetaInfFacesConfigResourceProvider.java:166)
    at com.sun.faces.config.configprovider.MetaInfFacesConfigResourceProvider.getResources(MetaInfFacesConfigResourceProvider.java:110)
    ... 16 more

如何避免此错误并确保热部署正常?

感谢您的帮助。

2 个答案:

答案 0 :(得分:1)

每个错误都是权限被拒绝错误。哪个操作系统用户运行Wildfly进程以及谁是G:\ wildfly-9.0.1.Final \ standalone \ tmp下目录的所有者?我猜是有O / S所有者问题。

答案 1 :(得分:0)

请检查另一个stackoverflow帖子: Wildfly fails to deploy application (FileNotFoundException - Access is Denied)

您必须从配置中删除这些行(standalone.xml):

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

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