Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to Start/Stop Websphere Applisation Server using ANT in eclipse

 
yatin shinde
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi;
I am new to Eclipse and Websphere. I deploy one project in Websphere Application Server. every time when i am done any change in my code and recompile that every time i manually stop and restart my Websphere Application server. which i don't want.
Now i am tring that using ant in eclipse i start and stop my Websphere Application server.
I tried alot but it not work..
So please help me.....
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yatin shinde:
Now i am tring that using ant in eclipse i start and stop my Websphere Application server.
I tried alot but it not work..

Yatin,
Welcome to JavaRanch!

What did you try? Can you show the Ant task you called? And when you say it doesn't work, what happened - error message, etc?
 
yatin shinde
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Jeanne;
Thanks for showing intrest in my problem.
to start stop websphere application server in eclips using Ant's build.xml
which i found in following site :
"http://publib.boulder.ibm.com/infocenter/wasinfo/v5r1//index.jsp?topic=/com.ibm.websphere.base.doc/info/aes/javadoc/ae/com/ibm/websphere/ant/tasks/package-summary.html"
but while running this script it gives me foli error :

Buildfile: D:\Yatin\XXX\build.xml

BUILD FAILED
D:\Yatin\XXX\build.xml:20: taskdef class com.ibm.websphere.ant.tasks.StartServer cannot be found

Total time: 140 milliseconds
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by yatin shinde:
BUILD FAILED
D:\Yatin\XXX\build.xml:20: taskdef class com.ibm.websphere.ant.tasks.StartServer cannot be found

How are you letting the build know where to find the jar containing the IBM tasks? There are two approaches that will work:
1) Add the jar to your ant classpath.
2) Add the classpath in your taskdef statement.

Can you show the line of code or classpath that does this?
 
yatin shinde
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI Jeanne;

I already try your both suggation of
1) Add the jar to your ant classpath.
2) Add the classpath in your taskdef statement.

it that time it gives me foll. error

start.server:

BUILD FAILED
D:\Yatin\XXX\build.xml:32: Unable to parse setupCmdLine: null\bin\setupCmdLine.bat (The system cannot find the path specified)

Total time: 192 milliseconds
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yatin,
Progress. Now Ant is finding the task and having problems with an environmental setting. Can you post the Ant snippet where you call the start server task?
 
yatin shinde
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi i am able to start and stop WebsphereApplicationServer using ant in eclipse
for this i use ant's exec command and run "startServer.bat" to start server and to stop "stopServer.bat"
but now i am new problem is that i want to build ant file in such a way that if i run ant build.xml file it check status of server
and if server is started then it stop server
and if server is stop it start server....
i am not able to put my code because while i pest code and click apply button it give error so please understant and help me........:-)
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34095
337
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think you would be better off writing a Jython script and calling it from Ant to get that information.

What error are you getting when posting code? If it is about < not being allowed, you need to convert them into &lt; symbols.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic