我正在尝试评估是否可以升级到 jboss 7.1.1 我创建了我的 grails 应用程序的 war 文件:
grails war
然后我将战争文件放在 jboss 独立部署目录中。由于我在输出中看到,它似乎被服务器拾取:
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
但是,当我尝试访问 127.0.0.1/my-application 时,我收到 404 错误消息。关于发生了什么或如何调试此问题的任何想法?
更新:我刚刚在 jboss 日志中注意到了这个错误:
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)
我发现另一个关于 grails 应用程序的 stackoverflow 问题没有与 jboss 一起运行,这与我面临的问题非常相似。我尝试了建议的解决方案并编辑了standalone.xml 文件。现在我面临一条实际的错误消息,在浏览器中我仍然收到 404 消息。这是来自 JBoss 日志的错误:
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\""}}}}