将Play 2应用程序部署到JBoss 7

时间:2012-10-16 12:54:58

标签: playframework-2.0 jboss7.x

我正在尝试将Play(2.0.4)应用程序部署到JBoss AS 7.1.0,但在过去几天内没有成功。

我使用了Play2WarPlugin,并按照说明进行操作。 (欢迎root被禁用,war被重命名为ROOT.war等)。但是,我得到以下内容 部署时出错

14:38:41,625 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015876: Starting deployment of "ROOT.war"
14:38:49,521 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry activation.jar in "/content/ROOT.war/WEB-INF/lib/javax.mail.mail-1.4.1.jar"  does not point to a valid jar for a Class-Path reference.
14:38:49,525 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry xml-apis.jar in "/content/ROOT.war/WEB-INF/lib/xalan.serializer-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
14:38:49,526 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry xercesImpl.jar in "/content/ROOT.war/WEB-INF/lib/xalan.xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
14:38:49,527 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry xml-apis.jar in "/content/ROOT.war/WEB-INF/lib/xalan.xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
14:38:49,528 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-1) Class Path entry serializer.jar in "/content/ROOT.war/WEB-INF/lib/xalan.xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
14:38:49,566 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC00001: Failed to start service jboss.deployment.unit."ROOT.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".PARSE: Failed to process phase PARSE of deployment "ROOT.war"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.0.Final.jar:7.1.0.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$Worker.runTask(ThreadPoolExecutor.java:886) [classes.jar:1.6.0_35]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [classes.jar:1.6.0_35]
at java.lang.Thread.run(Thread.java:680) [classes.jar:1.6.0_35]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS018031: Conflict occurred processing web fragment in JAR: com.github.play2war.play2-war-core_2.9.1-0.5.jar
at org.jboss.as.web.deployment.WarMetaDataProcessor.deploy(WarMetaDataProcessor.java:292)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.0.Final.jar:7.1.0.Final]
... 5 more
Caused by: java.lang.IllegalStateException: Unresolved conflict on servlet class: play.core.server.servlet30.Play2Servlet
at org.jboss.metadata.merge.web.spec.ServletMetaDataMerger.augment(ServletMetaDataMerger.java:93)
at org.jboss.metadata.merge.web.spec.ServletsMetaDataMerger.augment(ServletsMetaDataMerger.java:35)
at org.jboss.metadata.merge.web.spec.WebCommonMetaDataMerger.augment(WebCommonMetaDataMerger.java:313)
at org.jboss.as.web.deployment.WarMetaDataProcessor.deploy(WarMetaDataProcessor.java:290)
... 6 more

14:38:49,579 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "ROOT.war" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"ROOT.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ROOT.war\".PARSE: Failed to process phase PARSE of deployment \"ROOT.war\""}}
14:38:49,653 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment ROOT.war in 74ms
14:38:49,655 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014777:   Services which failed to start:      service jboss.deployment.unit."ROOT.war".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."ROOT.war".PARSE: Failed to process phase PARSE of deployment "ROOT.war"

14:38:49,658 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.\"ROOT.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"ROOT.war\".PARSE: Failed to process phase PARSE of deployment \"ROOT.war\""}}}}

我不确定警告是否是引起故障的事情或其他事情。 所以我的问题是: 您是否有任何建议和提示,可能导致错误的原因以及解决方法?

1 个答案:

答案 0 :(得分:1)

问题在于捆绑的play2war插件版本是错误的。从日志中你可以看到它尝试使用0.5但是为了部署到jboss 7.1.1,由于servlet 3.0容器,需要v0.8。

配置完成后,部署就会完成。