Reputation: 484
I'm trying to write a simple Jython script to AutoDeploy a web application on the IBM Websphere Application Server. However, I'm a novice in Python, so I can't uderstand, why do I become the following Error:
WASX7209I: Connected to process "dmgr" on node was7CellManager01 using SOAP connector; The type of process is: DeploymentManager
WASX7017E: Exception received while running file "deploy_test.py"; exception information: com.ibm.bsf.BSFException: exception from Jython:
Traceback (innermost last):
File "<string>", line 14, in ?
TypeError: sequence subscript must be integer or slice
My script:
appname='name'
source='app.ear'
nodeName='was7Node01'
cell='was7Cell01'
server='server1'
contextRoot='/deploymenttest'
# 1. node
# 2. cell
# 3. server
# 4. Application Name
# 5. ContextRoot
# 5. JNDI target name
attrs = [
'-node ', nodeName,
' -cell ', cell,
' -server ', server,
' -appname ', appname,
' -CtxRootForWebMod ', contextRoot,
' -MapResRefToEJB ', [
[
appname,"",
source+',WEB-INF/web.xml',
'jdbc/appdb','javax.sql.DataSource',
'jbdc/app22','DefaultPrincipalMapping',
'was7CellManager01/db2inst1',""
]
[
appname,"",
source+',WEB-INF/web.xml',
'jdbc/app1db','javax.sql.DataSource',
'jbdc/app22','DefaultPrincipalMapping',
'was7CellManager01/db2inst1',""
]
]
]
AdminApp.install(source, attrs)
Any ideas?
Thank you very much in advance.
Upvotes: 0
Views: 2489
Reputation: 4249
There is a missing coma between both of your MapResRefToEJB values @ line 27.
Upvotes: 2