Jboss CLI:预期[INT]但是STRING

时间:2013-08-23 19:22:23

标签: java java-ee jboss ejb command-line-interface

我正在制作CLI脚本,以便向http connector添加两个属性(max-post-size,max-save-post-size) 所以看起来应该是这样的:

<connector name="http" protocol="HTTP/1.1" scheme="http" max-post-size="5120000000" max-save-post-size="1024000000" socket-binding="http"/>

我的命令是:

/subsystem=web/connector=https:add(socket-binding=http,scheme=http,protocol="HTTP/1.1",max-post-size=5120000000, max-save-post-size=1024000000)

但它给了我

"failure-description" => "JBAS014688: Wrong type for max-post-size. Expected [INT] but was STRING",

所以我真的很困惑如何在CLI中声明整数,我尝试max-post-size=[5120000000]max-save-post-size=[1024000000]但它不起作用

1 个答案:

答案 0 :(得分:3)

鉴于

  

[standalone @ localhost:9999 connector = http] cd / subsystem = web / connector = http

属性的类型是INT

  

[standalone @ localhost:9999 connector = http] ls -l <​​br/>   属性值类型
  [...]
  max-post-size 2120000000 INT
  [...]

如果值是&lt; 2,147,483,647,它有效:

  

[standalone @ localhost:9999 connector = http] / subsystem = web / connector = http:write-attribute(name = max-post-size,value = 2120000000)
  {
      “结果”=&gt; “成功”,
      “response-headers”=&gt; {
          “operation-requires-reload”=&gt;如此,
          “process-state”=&gt; “重装要求的”
      }
  }

如果值更大,则失败:

  

[standalone @ localhost:9999 connector = http] / subsystem = web / connector = http:write-attribute(name = max-post-size,value = 3120000000)
  {
      “结果”=&gt; “失败”,
      “failure-description”=&gt; “JBAS014688:max-post-size的类型错误。预期[INT]但是STRING”,

      “roll-back”=&gt;如此,
      “response-headers”=&gt; {“process-state”=&gt; “重装要求的”}
  }

因此错误消息具有误导性。