title: Error deploying war into JBoss AS 7 (domain mode): "Failed to process phase STRUCTURE of deployment"
body: <p>I'm trying to deploy my war into JBoss AS 7 in domain mode, and I'm getting this error:</p>
  
  <pre><code>[Server:node02] 13:51:46,049 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-11) MSC00001: Failed to start service jboss.deployment.unit."ROOT.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "ROOT.war"
  [Server:node02]         at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
  [Server:node02]         at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
  [Server:node02]         at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
  [Server:node02]         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_30]
  [Server:node02]         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_30]
  [Server:node02]         at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_30]
  [Server:node02] Caused by: java.lang.IllegalArgumentException: Given parent is not an ancestor of this virtual file
  [Server:node02]         at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:116) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
  [Server:node02]         at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
  [Server:node02]         at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
  [Server:node02]         at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
  [Server:node02]         at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:122) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
  [Server:node02]         at org.jboss.vfs.VirtualFile.getPathNameRelativeTo(VirtualFile.java:110) [jboss-vfs-3.1.0.Final.jar:3.1.0.Final]
  [Server:node02]         at org.jboss.as.server.deployment.module.ManifestClassPathProcessor.createAdditionalModule(ManifestClassPathProcessor.java:193) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
  [Server:node02]         at org.jboss.as.server.deployment.module.ManifestClassPathProcessor.handlingExistingClassPathEntry(ManifestClassPathProcessor.java:185) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
  [Server:node02]         at org.jboss.as.server.deployment.module.ManifestClassPathProcessor.deploy(ManifestClassPathProcessor.java:162) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
  [Server:node02]         at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
  [Server:node02]         ... 5 more
  [Server:node02]
  [Server:node02] 13:51:46,060 INFO  [org.jboss.as.server] (host-controller-connection-threads - 3) JBAS015870: Deploy of deployment "ROOT.war" was rolled back with failure message {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"ROOT.war\".STRUCTURE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ROOT.war\".STRUCTURE: Failed to process phase STRUCTURE of deployment \"ROOT.war\""}}
  [Server:node02] 13:51:46,062 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-9) JBAS015877: Stopped deployment ROOT.war in 1ms
  [Server:node02] 13:51:46,063 INFO  [org.jboss.as.controller] (host-controller-connection-threads - 3) JBAS014774: Service status report
  [Server:node02] JBAS014777:   Services which failed to start:      service jboss.deployment.unit."ROOT.war".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".STRUCTURE: Failed to process phase STRUCTURE of deployment "ROOT.war"
  [Server:node02]
  </code></pre>
  
  <p>My jboss-deployment-structure.xml is bellow</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.1"&gt;
      &lt;deployment&gt;
          &lt;exclusions&gt;
              &lt;module name="org.slf4j" /&gt;
              &lt;module name="org.slf4j.impl" /&gt;
  &lt;!--            &lt;module name="org.hibernate" /&gt; --&gt;
          &lt;/exclusions&gt;
          &lt;!-- This allows you to define additional dependencies, it is the same 
              as using the Dependencies: manifest attribute --&gt;
          &lt;dependencies&gt;
              &lt;module name="deployment.sun.jdk" /&gt;
          &lt;/dependencies&gt;
      &lt;/deployment&gt;
      &lt;!-- This is a module that re-exports the containers version of javassist.util.proxy --&gt;
      &lt;!-- This means that there is only one version of the Proxy classes defined --&gt;
      &lt;module name="deployment.sun.jdk"&gt;
          &lt;dependencies&gt;
              &lt;module name="sun.jdk"&gt;
                  &lt;imports&gt;
                      &lt;include path="com/sun/crypto" /&gt;
                      &lt;include path="com/sun/crypto/provider" /&gt;
                      &lt;include path="com/sun/image/codec/jpeg" /&gt;
                      &lt;include path="com/sun/org/apache/xml/internal/resolver" /&gt;
                      &lt;include path="com/sun/org/apache/xml/internal/resolver/tools" /&gt;
                  &lt;/imports&gt;
              &lt;/module&gt;
          &lt;/dependencies&gt;
      &lt;/module&gt;
  &lt;/jboss-deployment-structure&gt;
  </code></pre>