无法通过脚本推出应用程序版本

时间:2015-04-17 16:18:16

标签: websphere websphere-8

我正在尝试使用WAS ND 8.5上的以下命令推出当前版本的应用程序。

<target name="rolloutCurrentVersion">
        <wsadmin
            host="${hostName}" 
            port="${connPort}" 
            user="${userId}" 
            password="${password}"
            conntype="SOAP"
            lang="jacl"
            command="$AdminTask rolloutEdition {-appName ${appName} -edition 4.0 -params '{rolloutStrategy grouped}{resetStrategy soft}{groupSize 1}{drainageInterval 60}'}"
        />
    </target>

执行此任务时,它会给我以下消息:

[wsadmin] WASX7015E: Exception running command: "$AdminTask rolloutEdition {-appName My_App_Cluster -edition 4.0 -params '{rolloutStrategy grouped}{resetStrategy soft}{groupSize 1}{drainageInterval 60}'}"; exception information:
[wsadmin] com.ibm.websphere.management.cmdframework.RequiredParameterNotFoundException: ADMF0002E: Required parameter appName is not found for command rolloutEdition.

我已经提到了&#34; -appName&#34;命令中的参数。语法有问题吗?我使用this文档来制作命令。

1 个答案:

答案 0 :(得分:0)

我必须更改命令才能使其正常工作。我没有在引号中传递参数,而是在大括号中传递了值。 e.g。

我通过了:

command="$AdminTask rolloutEdition {-appName ${appName} -edition 4.0 -params {{rolloutStrategy grouped}{resetStrategy soft}{groupSize 1}{drainageInterval 60}}}"

代替:

command="$AdminTask rolloutEdition {-appName ${appName} -edition 4.0 -params '{rolloutStrategy grouped}{resetStrategy soft}{groupSize 1}{drainageInterval 60}'}"
相关问题