【问题标题】:jboss as 7: JBAS014639: Attribute enabled is not writable (deployment attribute)jboss as 7: JBAS014639: Attribute enabled is not writable (deployment attribute)
【发布时间】:2013-08-20 20:27:59
【问题描述】:

我已经通过 jboss-cli 为我的所有服务器组部署了一个应用程序,并且该应用程序对所有组都启用了。直到那里没问题!

但是

我需要通过 jboss-cli 从我的一个组(称为“honda”)禁用(而不是取消部署)该应用程序。问题是这个选项只能通过 Web 控制台使用。

当我通过 jboss-cli 并执行此操作时

/server-group=honda/deployment=app01.war:write-attribute(name=enabled, value=false)

我收到了回复

{
    "outcome" => "failed",
    "failure-description" => {"domain-failure-description" => "JBAS014639: Attribute enabled is not writable"},
    "rolled-back" => true
}

我已经在 google 上查找了“JBAS014639: Attribute enabled is not writable”,但没有找到关于 deployment

enabled 属性的任何资源

请帮帮我

【问题讨论】:

    标签: java deployment jboss jboss7.x


    【解决方案1】:

    在您看到的 WAR 上使用 :read-resource-description:

            "enabled" => {
                "type" => BOOLEAN,
                "description" => "Boolean indicating whether the deployment content is currently deployed in the runtime (or should be deployed in the runtime the next time the server starts.)",
                "expressions-allowed" => false,
                "nillable" => true,
                "default" => false,
                "access-type" => "read-only",
                "storage" => "configuration"
            },
    

    由于 access-type=read-only 您会收到错误消息。你有另一个字段:

                "status" => {
                "type" => STRING,
                "description" => "The current runtime status of a deployment. Possible status modes are OK, FAILED, and STOPPED. FAILED indicates a dependency is missing or a service could not start. STOPPED indicates that the deployment was not enabled or was manually stopped.",
    

    所以我猜你想要的是你的 WAR 已经启用=false 和 status=STOPPED 并且你的 WAR 没有被删除。您可以通过以下方式之一获得此信息:

    :read-operation-names
    {
    "outcome" => "success",
    "result" => [
        "add",
        "deploy",
        "read-attribute",
        "read-children-names",
        "read-children-resources",
        "read-children-types",
        "read-operation-description",
        "read-operation-names",
        "read-resource",
        "read-resource-description",
        "redeploy",
        "remove",
        "undefine-attribute",
        "undeploy",
        "whoami",
        "write-attribute"
    ]
    }
    

    在这种情况下,您使用 :undeploy 禁用应用程序并使用 :deploy 启用它。这就是网络控制台的作用。

    【讨论】:

      猜你喜欢
      • 2018-02-18
      • 2011-10-16
      • 1970-01-01
      • 1970-01-01
      • 2022-12-28
      • 1970-01-01
      • 2022-12-02
      • 2020-11-23
      • 2014-07-16
      相关资源
      最近更新 更多