【问题标题】:Deploying playframework application on Jboss AS 7.1在 Jboss AS 7.1 上部署 playframework 应用程序
【发布时间】:2014-05-13 21:06:30
【问题描述】:

我正在尝试在 Jboss AS 7.1 上部署一个 playframework 应用程序,但我遇到了一些困难,我试图找到解决方案但我找不到。所以首先我正在使用 play2war 插件构建战争文件 - 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 是默认配置——我没有改变任何东西。因此,如果有人可以掌舵我,我将非常感激。

【问题讨论】:

    标签: playframework jboss7.x


    【解决方案1】:

    我找到了解决方案。问题是播放记录器不能很好地与 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)配置。

    【讨论】:

      猜你喜欢
      • 2015-04-13
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-12-30
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多