title: jboss seems to load my war file but gives a 404 page, and how can I fix this?
body: <p>I am trying to evaluate if I can upgragde to jboss 7.1.1
  I created the war file of my grails application:</p>
  
  <pre><code>grails war
  </code></pre>
  
  <p>then I put the war file inside the jboss standalone deployment directory. It seems to be picked up by the server since I see in the output:</p>
  
  <pre><code>11:43:19,026 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS018559: Deployed "my-application-0.1.war"
  11:43:19,483 INFO  [org.jboss.osgi.framework.internal.HostBundleState] (MSC service thread 1-4) Bundle started: my-application:0.1.0
  </code></pre>
  
  <p>However when I try to access 127.0.0.1/my-application I get a 404 error message. Any ideas about what is going on or how I can debug this issue?</p>
  
  <p>Update: I just noticed this error in the jboss log:</p>
  
  <pre><code>12:33:48,499 ERROR [org.jboss.as] (MSC service thread 1-2) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 4214ms - Started 151 of 227 services (1 services failed or missing dependencies, 74 services are passive or on-demand)
  </code></pre>
  
  <p>I found <a href="https://stackoverflow.com/questions/9203092/grails-1-3-7-not-starting-with-jboss-7-1">another stackoverflow question on grails app not running with jboss</a> which is very similar to what I am facing. I tried the suggested solution and edited the standalone.xml file. Now I am facing an actual error message, and in the browser I still get the 404 message. Here is the error from JBoss log:</p>
  
  <pre><code>12:59:13,749 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2)JBAS015876: Starting deployment of "my-application-0.1.war"
  12:59:16,530 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."my-application-0.1.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."my-application-0.1.war".PARSE: Failed to process phase PARSE of deployment "my-application-0.1.war"
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.6.0_23]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.6.0_23]
      at java.lang.Thread.run(Thread.java:679) [rt.jar:1.6.0_23]
  Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018014: Failed to parse XML descriptor "/content/my-application-0.1.war/WEB-INF/jboss-web.xml" at [3,2]
      at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:77)
      at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]
      ... 5 more
  Caused by: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[3,2]
  Message: Unexpected element 'class-loading' encountered
      at org.jboss.metadata.parser.util.MetaDataElementParser.unexpectedElement(MetaDataElementParser.java:108)
      at org.jboss.metadata.parser.jbossweb.JBossWebMetaDataParser.parse(JBossWebMetaDataParser.java:211)
      at org.jboss.as.web.deployment.JBossWebParsingDeploymentProcessor.deploy(JBossWebParsingDeploymentProcessor.java:69)
      ... 6 more 12:59:16,541 INFO  [org.jboss.as] (MSC service thread 1-1) JBAS015951: Admin console listening on http://127.0.0.1:9990 12:59:16,541 ERROR [org.jboss.as] (MSC service thread 1-1) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 5009ms - Started 135 of 179 services (1 services failed or missing dependencies, 42 services are passive or on-demand) 12:59:16,542 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "my-application-0.1.war" was rolled back with failure message {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"my-application-0.1.war\".PARSE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"my-application-0.1.war\".PARSE: Failed to process phase PARSE of deployment \"my-application-0.1.war\""}} 12:59:16,819 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment my-application-0.1.war in 276ms
  12:59:16,820 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report JBAS014777:   Services which failed to start:      service jboss.deployment.unit."my-application-0.1.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."my-application-0.1.war".PARSE: Failed to process phase PARSE of deployment "my-application-0.1.war"
  12:59:16,821 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" =&gt; {"Operation step-2" =&gt; {"JBAS014671: Failed services" =&gt; {"jboss.deployment.unit.\"my-application-0.1.war\".PARSE" =&gt; "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"my-application-0.1.war\".PARSE: Failed to process phase PARSE of deployment \"my-application-0.1.war\""}}}}
  </code></pre>