jboss seems to load my war file but gives a 404 page, and how can I fix this?

I am trying to evaluate if I can upgragde to jboss 7.1.1 I created the war file of my grails application:

grails war

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:

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

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?

Update: I just noticed this error in the jboss log:

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)

I found another stackoverflow question on grails app not running with jboss 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:

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" => {"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,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:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"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\""}}}}

Answers


You are using an old jboss-web.xml (with a different schema) with JBoss AS 7. The older schema had an element named "class-loading" which is not available with JBoss AS 7. Please refer the schema's [1] for the right format.

[1] https://community.jboss.org/wiki/JBossDTDs

Need Your Help

How do I clear navigation history in Silverlight/Windows Phone 7?

silverlight navigation windows-phone-7

I'm making a Windows Phone 7 app that has login/logout semantics (authenticating to a web app). When the user logs out I navigate back to the login screen and forget the session authentication.

Parse JSON array without json.net

c# arrays json parsing

I am looking to get each "name" property and "text" property from my json string and add them to their respective lists.

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.