在Jboss AS 7.1上部署playframework应用程序

时间:2014-05-13 21:06:30

标签: playframework jboss7.x

我正在尝试在Jboss AS 7.1上部署一个playframework应用程序,但我遇到了一些困难,我试图找到解决方案,但我无法做到。首先,我使用play2war插件构建war文件 - https://github.com/dlecan/play2-war-plugin

在我尝试部署应用程序后,问题就出现了 - 服务器说上下文已初始化,但部署失败(从服务器也抛出一个奇怪的BufferOverflowError时起)。所以这是日志:

 23:50:28,255 ERROR [org.jboss.as] (Controller Boot Thread) JBAS015875: JBoss AS 7.1.0.Final "Thunder" started (with errors) in 2760ms - Started 133 of 205 services (1 services failed or missing dependencies, 70 services are passive or on-demand)
 23:50:42,295 INFO  [org.jboss.as.repository] (HttpManagementService-threads - 3) JBAS014900: Content added at location E:\dev_tools\jboss-as-7.1.0.Final\standalone\data\content\d7\a090a1f99ee107b2847f47b1c9685f4db3811f\content
 23:50:49,972 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-8) JBAS015876: Starting deployment of "texttocopy.war"
 23:51:00,758 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry activation.jar in "/E:/dev_tools/jboss-as-7.1.0.Final/bin/content/texttocopy.war/WEB-INF/lib/javax.mail.mail-1.4.jar"  does not point to a valid jar for a Class-Path reference.
 23:51:00,763 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xbean.jar in "/E:/dev_tools/jboss-as-7.1.0.Final/bin/content/texttocopy.war/WEB-INF/lib/org.apache.xmlgraphics.batik-js-1.7.jar"  does not point to a valid jar for a Class-Path reference.
 23:51:00,775 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xml-apis.jar in "/E:/dev_tools/jboss-as-7.1.0.Final/bin/content/texttocopy.war/WEB-INF/lib/xalan.serializer-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
 23:51:00,779 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xercesImpl.jar in "/E:/dev_tools/jboss-as-7.1.0.Final/bin/content/texttocopy.war/WEB-INF/lib/xalan.xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
 23:51:00,781 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry xml-apis.jar in "/E:/dev_tools/jboss-as-7.1.0.Final/bin/content/texttocopy.war/WEB-INF/lib/xalan.xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
 23:51:00,784 WARN  [org.jboss.as.server.deployment] (MSC service thread 1-2) Class Path entry serializer.jar in "/E:/dev_tools/jboss-as-7.1.0.Final/bin/content/texttocopy.war/WEB-INF/lib/xalan.xalan-2.7.1.jar"  does not point to a valid jar for a Class-Path reference.
 23:51:01,277 INFO  [org.jboss.as.pojo] (MSC service thread 1-8) JBAS017000: Found legacy bean/pojo namespace: urn:jboss:bean-deployer:2.0 - might be missing some xml features (potential exceptions).
 23:51:01,593 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
 23:51:01,598 INFO  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) JBAS010404: Deploying non-JDBC-compliant driver class com.mysql.jdbc.Driver (version 5.1)
 23:51:01,601 WARN  [org.jboss.as.connector.deployers.jdbc] (MSC service thread 1-8) JBAS010402: Unable to instantiate driver class "com.mysql.jdbc.Driver": org.jboss.msc.service.DuplicateServiceException: Service jboss.jdbc-driver.texttocopy_war is already registered
 23:51:01,695 INFO  [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/texttocopy]] (MSC service thread 1-5) PlayServletWrapper > contextInitialized

管理控制台的错误是:

2014-05-13 23:53:21,590 [ERROR] Message{conciseMessage='Unknown error', detailedMessage='Unexpected HTTP response: 500

Request
{
    "address" => [("deployment" => "texttocopy.war")],
    "operation" => "deploy"
}

Response

Internal Server Error
{
    "outcome" => "failed",
    "failure-description" => {"JBAS014671: Failed services" =>        
{"jboss.web.deployment.default-host./texttocopy" => "org.jboss.msc.service.StartException in service jboss.web.deployment.default-host./texttocopy: JBAS018040: Failed to start context"}}, "rolled-back" => true
}

standalone.xml是默认配置 - 我还没有改变任何东西。所以,如果有人能够掌舵我,我将非常感激。

1 个答案:

答案 0 :(得分:0)

我找到了解决方案。问题是播放记录器与jboss没有很好地“播放”,因此所有应用程序日志都丢失了。所以这是一个直接来自play2war插件作者的解决方案:

以下是要在项目中包含以禁用Play Logger的新依赖项:

val appDependencies = Seq(
  // ... Actual dependencies
  "com.github.play2war.ext" %% "redirect-playlogger" % "1.0.1" // add this after your others dependencies
)

它是如何工作的? 播放记录器配置已禁用,也就是说将忽略项目的logger.xml文件。 因此,日志必须由您的应用服务器配置(例如,JBoss)。