Jacl script war deploymet

允我心安 提交于 2019-12-24 10:25:36

问题


I'm trying to deploy war in websphere using jacl script , below is the command i'm using

set opts [list -cluster $clusterName -appname $earFileName -contextroot $appContextRoot -installed.ear.destination $destination -MapWebModToVH $virtualHost]

$AdminApp install $earFileLocation  $opts

After adding -MapWebModToVH $virtualHost parameter i'm getting

WASX7017E: java.lang.ClassCastException: java.lang.String incompatible with java.util.List

i checked the link http://www-01.ibm.com/support/docview.wss?uid=swg21428721 for reference.

any help will be appreciated

updates

  1. set opts [list -cluster $clusterName -appname $earFileName -contextroot $appContextRoot -installed.ear.destination $destination -MapWebModToVH {$virtualHost}]

then i get

 WASX7017E: Exception received while running file "./CSDeployWar.jacl"; exception information: java.lang.ClassCastException: java.lang.ClassCastException: java.lang.String incompatible with java.util.List

2 set opts [list -cluster $clusterName -appname $earFileName -contextroot $appContextRoot -installed.ear.destination $destination {-MapWebModToVH {$virtualHost}}]. then i get

java.lang.IllegalArgumentException: WASX7122E: Expected "-" not found

回答1:


@upog you passing String as argument, you need to pass it as List. something like this

 {-MapWebModToVH {{"JavaMail Sample WebApp" mtcomps.war,WEB-INF/web.xml newVH}}}

Look at this page: http://publib.boulder.ibm.com/infocenter/iseries/v5r4/index.jsp?topic=%2Frzatz%2F51%2Fadmin%2Fwsaobjadmapp.htm




回答2:


finally the below command worked

set opts [list -cluster $clusterName -appname $earFileName -contextroot $appContextRoot -installed.ear.destination $destination -usedefaultbindings -defaultbinding.virtual.host $virtualHost]

$AdminApp install $earFileLocation  $opts


来源:https://stackoverflow.com/questions/23619850/jacl-script-war-deploymet

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!