Hi all, I'm wondering if someone can help me with my wsadmin script below. I'm having trouble with an AdminApp.install() command failing when it's populated with variables but working when it's typed explicitly and I can't see why. Maybe a second set of eyes will help :o)
This does work and the app installs perfectly:
AdminApp.install(earFile, ['-appname', 'nbp-cas-CURRENT-9.1.15', '-MapModulesToServers', [['.*', '.*.war,.*', 'WebSphere:cell=WWCell,node=WWNode1,server=TestWebServer1+WebSphere:cell=WWCell,node=WWNode2,server=TestWebServer2+WebSphere:cell=WWCell,cluster=SysTest_MW_Current']], '-MapWebModToVH', [['.*', '.*.war,.*', 'default_host']]])
This does not work, it fails with the error beneath the command:
earFile = "/WebSphere/ZS0X/ear-files/ear-9.1.15.ear"
installOptions = "['-appname', 'nbp-cas-CURRENT-9.1.15', '-MapModulesToServers', [['.*', '.*.war,.*', 'WebSphere:cell=WWCell,node=WWNode1,server=TestWebServer1+WebSphere:cell=WWCell,node=WWNode2,server=TestWebServer2+WebSphere:cell=WWCell,cluster=SysTest_MW_Current']], '-MapWebModToVH', [['.*', '.*.war,.*', 'default_host']]]"
AdminApp.install(earFile, installOptions)
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: WASX7122E: Expected "-" not found.
['-appname', 'nbp-cas-CURRENT-9.1.15', '-MapModulesToServe...
^