2015-08-13 107 views
0

尝试部署的EAR当我在上Wildfly以下错误:无法在WildFly 8.2.1.Final部署EAR

[[email protected]:9990 /] deploy /opt/banco_ear.ear 
{"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"banco_ear.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"banco_ear.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"banco_ear.ear\" 
    Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018740: Failed to mount deployment content 
    Caused by: java.io.IOException: VFS000015: Could not create directory for original name 'content' after 10 attempts"}}}} 

耳朵被IntelliJ IDEA的产生和我解决所有的依赖。我是远程部署的新手,我觉得这很困难。

这里是我的application.xml

<?xml version="1.0" encoding="UTF-8"?> 
<application xmlns="http://java.sun.com/xml/ns/javaee" 
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
      xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/application_6.xsd" 
      version="6"> 

    <module id="banco-Web"> 
     <web> 
      <web-uri>web.war</web-uri> 
      <context-root>bancoWeb</context-root> 
     </web> 
    </module> 
</application> 

有什么不对?

提前致谢。

编辑

当我运行JBoss的-CLI为wildfly用户,并尝试将应用程序部署(在本地wildfly运行的很好),CLI中抛出一个异常:

[[email protected]:9990 /] deploy /opt/prueba_ear.ear 
{"WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"WFLYCTL0080: Failed services" => {"jboss.deployment.unit.\"prueba_ear.ear\".WeldStartService" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"prueba_ear.ear\".WeldStartService: Failed to start service 
    Caused by: org.jboss.weld.exceptions.DefinitionException: Exception List with 1 exceptions: 
Exception 0 : 
javax.enterprise.event.ObserverException 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) 
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) 
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) 
    at java.lang.reflect.Constructor.newInstance(Constructor.java:422) 
    at java.lang.Class.newInstance(Class.java:442) 
    at org.jboss.weld.security.NewInstanceAction.run(NewInstanceAction.java:33) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:40) 
    at org.jboss.weld.injection.Exceptions.rethrowException(Exceptions.java:78) 
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:96) 
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:78) 
    at org.jboss.weld.injection.MethodInvocationStrategy$SimpleMethodInvocationStrategy.invoke(MethodInvocationStrategy.java:129) 
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:306) 
    at org.jboss.weld.event.ExtensionObserverMethodImpl.sendEvent(ExtensionObserverMethodImpl.java:121) 
    at org.jboss.weld.event.ObserverMethodImpl.sendEvent(ObserverMethodImpl.java:284) 
    at org.jboss.weld.event.ObserverMethodImpl.notify(ObserverMethodImpl.java:262) 
    at org.jboss.weld.event.ObserverNotifier.notifySyncObservers(ObserverNotifier.java:271) 
    at org.jboss.weld.event.ObserverNotifier.notify(ObserverNotifier.java:260) 
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:154) 
    at org.jboss.weld.event.ObserverNotifier.fireEvent(ObserverNotifier.java:148) 
    at org.jboss.weld.bootstrap.events.AbstractContainerEvent.fire(AbstractContainerEvent.java:54) 
    at org.jboss.weld.bootstrap.events.AbstractDefinitionContainerEvent.fire(AbstractDefinitionContainerEvent.java:42) 
    at org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl.fire(AfterBeanDiscoveryImpl.java:61) 
    at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:420) 
    at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83) 
    at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:93) 
    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) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
    at java.lang.Thread.run(Thread.java:745) 
Caused by: java.lang.IllegalAccessError: tried to access method com.sun.faces.flow.FlowCDIContext.<init>(Ljava/util/Map;)V from class com.sun.faces.flow.FlowCDIExtension 
    at com.sun.faces.flow.FlowCDIExtension.afterBeanDiscovery(FlowCDIExtension.java:76) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
    at java.lang.reflect.Method.invoke(Method.java:497) 
    at org.jboss.weld.injection.StaticMethodInjectionPoint.invoke(StaticMethodInjectionPoint.java:88) 
    ... 21 more 
"}}}} 
+2

这看起来像我正在执行wildfly的用户没有权限写或创建它的临时和/或工作目录 –

回答

0

如果文件被远程部署,部署到WILDFLY_HOME/standalone/data/content而不是WILDFLY_HOME/standalone/deployments,并且在standalone.xml中创建了一个用于部署的条目,如下所示。

<deployments> 
     <deployment name="My-Project.ear" runtime-name="My-Project.ear"> 
      <content sha1="fb085ab4a36109125517bbe79e3af645170b7814"/> 
     </deployment> 
</deployments> 

它看起来像wildfly用户(或曾经用户部署正在执行)没有写权限WILDFLY_HOME/standalone/data/content文件夹中。

+0

谢谢你的答案。我以root身份登录到服务器,并以root用户身份运行./jboss-cli.sh。但是如果我以wildfly用户身份运行jboss-cli,服务器将返回另一个异常错误。第一篇文章是文字。 – Nico

+0

@Nico:看起来像野蛮的用户不能访问,你可以在linux中使用'chmod'命令来更改权限。在独立文件夹中运行'chmod 777'将是最简单的选择。请参阅此链接以获取更多详细信息https://www.maketecheasier.com/file-permissions-what-does-chmod-777-means/ – Shiva

+0

我将野蛮主文件夹的权限更改为777.并且仍然抛出相同的异常我在第一篇文章编辑部分指定。什么是WeldStartService异常? – Nico