• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Issue in deploying WAR file on websphere using ant

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
author & internet detective
Posts: 41878
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Mysore Prashanth,

Did you find any solution to deploy the war file to websphere 7 through ws_ant task
 
Rakesh hyderabad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
As per my project requirement I need to automate the war deployment on Websphere 7 using ant.
If you got the solution please help.
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Rakesh hyderabad
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
reply
    Bookmark Topic Watch Topic
  • New Topic