1

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
upog
  • 4,965
  • 8
  • 42
  • 81

2 Answers2

0

@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

sfgroups
  • 18,151
  • 28
  • 132
  • 204
  • when i changed to set opts [list -cluster $clusterName -appname $earFileName -contextroot $appContextRoot -installed.ear.destination $destination {-MapWebModToVH {$virtualHost}}]. i get java.lang.IllegalArgumentException: WASX7122E: Expected "-" not found. – upog May 13 '14 at 14:51
0

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
upog
  • 4,965
  • 8
  • 42
  • 81