This week's book giveaway is in the OCPJP forum.
We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line!
See this thread for details.
The moose likes Websphere and the fly likes Excecuting stopapplication ANT task from Windows platform, on a WAS server running on UNIX box. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Excecuting stopapplication ANT task from Windows platform, on a WAS server running on UNIX box." Watch "Excecuting stopapplication ANT task from Windows platform, on a WAS server running on UNIX box." New topic
Author

Excecuting stopapplication ANT task from Windows platform, on a WAS server running on UNIX box.

Yogendra Singh Butola
Greenhorn

Joined: Sep 28, 2011
Posts: 13
While executing stopapplication ANT task from Windows platform on a server running on a UNIX box, I get an error saying the setupCmdLine.bat command is not found.

Following is the script log for your reference:

echo] Stopping the application

wsStopApp] Stopping Application [RabbitEar]...

BUILD FAILED

C:\work\build\DepolyOnWAS.xml:59: Unable to parse setupCmdLine: \rabbit\dev\WebSphere70dev\Common\bin\setupCmdLine.bat (The system cannot find the path specified.)



The file setupCmdLine.sh is there in the metioned path, however, it looks for the file setupCmdLine.bat.


It happens with statApplication, stopserver, and startserver also.

Somehow, I'm not able to tell the script that the server is lying on remote UNIX box, and it should look for setupCmdLine.sh instead of setupCmdLine.bat.


NOTE: The script runs perfectly fine on a server running on Windows platform.
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5838
    
    7

Fix your script to refer to a .sh file instead of a .bat file.

If you need more help than that, post the script.


JBoss In Action
Yogendra Singh Butola
Greenhorn

Joined: Sep 28, 2011
Posts: 13
<taskdef name="wsStopApp" classpathref="lib.ref" classname="com.ibm.websphere.ant.tasks.StopApplication" />

<target name="stopApplication">
<echo message="Stopping the application" />
<wsStopApp application="MyAppEar" conntype="${remoteConnType}" washome="${user.install.root}" server="${was.server}" host="${remoteHostName}" node="${was.node}" port="8880" failonerror="true" />
</target>


What can I set to let the script know to use .sh


-Yogi
Peter Johnson
author
Bartender

Joined: May 14, 2008
Posts: 5838
    
    7

The wsStopApp task is not part of Ant, it is part of WebSphere extensions to Ant. I am somewhat surprised that IBM has not coded this task to determine what OS it is running on and thus invoke the correct script. Anyway, you will probably get more help from people familiar with the WebSphere extensions for Ant so I will move your post.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Excecuting stopapplication ANT task from Windows platform, on a WAS server running on UNIX box.