问题
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
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