Issue in deploying WAR file on websphere using ant
Mysore Prashanth
Greenhorn
Joined: Jun 10, 2010
Posts: 3
posted
0
Hi,
I am trying to build a script for automating deployment on websphere 7.0 on local Windows machine. I have a doubt regarding wsInstallApp ant tas - does it allow WAR file specification for the parameter EAR? Is any other ant task to be used for deploying WAR file on websphere? wsUnInstallApp is working fine for undeploying the application.
I am held with the below error which is not allowing me to deploy WAR file.
As you noted that task is for EAR files not WAR files. I don't know of a task from WebSphere that deploys wars. If you know how to install a war at the command line, you could call <exec> in Ant to call that. Or you could create an EAR around your war.
You'll get more help if you TellTheDetails! The code and error that Mysore posted is rather obvious - the ear parameter referenced a WAR not and EAR. But without seeing your ant task and the exception being thrown, there is not much more we can add.
Hi Peter,
Thanks for showing intrest in my issue.
Below is the code I am using to deploy the war file on WAS7 using ant
build.properties
waroptions=-nopreCompileJSPs -distributeApp -nouseMetaDataFromBinary -nodeployejb -appname jspellhtml_war -createMBeansForResources -noreloadEnabled -nodeployws -validateinstall warn -noprocessEmbeddedConfig -noallowDispatchRemoteInclude -noallowServiceRemoteInclude -asyncRequestDispatchType DISABLED -nouseAutoLink -MapWebModToVH{{jspellhtml_war jspellhtml.war,WEB-INF/web.xml default_host}} -CtxRootForWebMod {{"JSpell HTML Pro Spell Checker www.jspell.com" jspellhtml.war,WEB-INF/web.xml /jspellhtml}}
----------------------------------------------------------------------
Running the ant target by below command
[tomcat@in-hyd-zfwassrv1 Integration-Daily]$ /opt/wasadmin/IBM/WebSphere/AppServer/bin/ws_ant.sh -f build.xml war_deploy
Buildfile: build.xml
belwo are the logs
war_deploy:
[wsInstallApp] Installing Application [/opt/jenkins/projects/Integration-Daily/build/lib/jspellhtml.war]...
[wsadmin] WASX7209I: Connected to process "server1" on node AppSrv02Node using SOAP connector; The type of process is: UnManagedProcess
[wsadmin] WASX7017E: Exception received while running file "/tmp/wsant37899jacl"; exception information: com.ibm.bsf.BSFException: error while eval'ing Jacl expression:
[wsadmin] Java Result: 105
[wsInstallApp] Installed Application [/opt/jenkins/projects/Integration-Daily/build/lib/jspellhtml.war]
[wsStartApp] Starting Application [jspell]...
[wsadmin] WASX7209I: Connected to process "server1" on node AppSrv02Node using SOAP connector; The type of process is: UnManagedProcess
[wsadmin] WASX7017E: Exception received while running file "/tmp/wsant37900jacl"; exception information: javax.management.MBeanException [wsadmin] com.ibm.ws.exception.ConfigurationWarning: Application jspell not installed
[wsadmin] Java Result: 105
[wsStartApp] Started Application [jspell]
BUILD SUCCESSFUL
Total time: 33 seconds
After running the script I am getting this Exception in above logs and war fileis not deployed.
wsadmin] WASX7017E: Exception received while running file "/tmp/wsant37900jacl"; exception information: javax.management.MBeanException
The error appears to have originated either in WAS or in the wsStartApp task (which is part of WAS, not part of Ant). You would have more luck having WAS experts looking at this issue. I'll move the post for you.