我在solaris 11服务器上安装了WAS 8.0。我正在尝试使用jython脚本在WAS中部署Application EAR。
Jython脚本:/home/deploy.py
earLoc='/home/artifacts/Statement-bva-application.ear'
appName='Statement-bva'
cellName=AdminControl.getCell()
nodeName=AdminControl.getNode()
appManager=AdminControl.queryNames('cell='+cellName+',node='+nodeName+',type=ApplicationManager,process=server1,*')
print appManager
#AdminControl.invoke(appManager , 'stopApplication',appName)
print AdminApp.uninstall(appName)
AdminConfig.save()
print AdminApp.install(earLoc)
AdminConfig.save()
AdminControl.invoke(appManager , 'startApplication',appName)
WAS命令:
/opt/IBM/WebSphere/AppServer/bin/wsadmin.sh -lang jython -f /home/deploy.py
但它无法通过jython脚本安装EAR
WASX7017E: Exception received while running file "/home/deploy.py";
exception information:
com.ibm.websphere.management.application.client.AppDeploymentException:
com.ibm.websphere.management.application.client.AppDeploymentException:
[Root exception is org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: META-INF/application.xml]
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException:
org.eclipse.jst.j2ee.commonarchivecore.internal.exception.SaveFailureException: META-INF/application.xml
我可以通过WAS管理控制台安装该应用程序。它通过jython脚本失败。