wood burning stoves 2.0*
The moose likes Websphere and the fly likes Issue in deploying WAR file on websphere using ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Issue in deploying WAR file on websphere using ant" Watch "Issue in deploying WAR file on websphere using ant" New topic
Author

Issue in deploying WAR file on websphere using ant

Mysore Prashanth
Greenhorn

Joined: Jun 10, 2010
Posts: 3
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.

The piece of code which is causing me trouble is

The error message is

Thanks in advance
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31057
    
232

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rakesh hyderabad
Greenhorn

Joined: Jun 12, 2012
Posts: 3
Hi Mysore Prashanth,

Did you find any solution to deploy the war file to websphere 7 through ws_ant task
Rakesh hyderabad
Greenhorn

Joined: Jun 12, 2012
Posts: 3
As per my project requirement I need to automate the war deployment on Websphere 7 using ant.
If you got the solution please help.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

Rakesh, welcome to Java Ranch!

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.


JBoss In Action
Rakesh hyderabad
Greenhorn

Joined: Jun 12, 2012
Posts: 3
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

Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5845
    
    7

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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Issue in deploying WAR file on websphere using ant