I tried running the ant task wsStopApp from Appendix A of the book. Here is my ant script
<project name="MyProject" default="stopApp" basedir=".">
<description>
websphere admin
</description>
<property name="server" location="server1"/>
<property name="app" location="HelloEAR"/>
<property name="wasHome" location="C:\Program Files\WebSphere\AppServer" />
<taskdef name="wsStopApp"
classname="com.ibm.websphere.ant.tasks.StopApplica tion" />
<target name="stopApp">
<wsStopApp application="${app}"
wasHome="${wasHome}"
/>
</target>
</project>
Initially it could find the class com.ibm.websphere.ant.tasks.StopApplication.
I browsed through the jar files under
C:\Program Files\WebSphere\AppServer\lib
and found the class in wsanttasks.jar
Then I got this next error message
------------------------------------------------------------------
stopApp:
[wsStopApp] Stopping Application [C:\Documents and Settings\JNg\My Documents\devel\deploy automation\WebSphere\HelloEAR]...
[wsadmin] WASX7023E: Error creating "SOAP" connection to host "localhost"; exception information:java.lang.NoClassDefFoundError: com/sun/mail/util/BASE64DecoderStream
[wsadmin] WASX7213I: This scripting client is not connected to a server process; please refer to the log file C:\Program Files\WebSphere\AppServer\logs\wsadmin.traceout for additional information.
[wsadmin] WASX7017E: Exception received while running file "C:\DOCUME~1\JNg\LOCALS~1\Temp\wsant28410jacl" ; exception information: com.ibm.bsf.BSFException: error while eval'ing Jacl expression: java.lang.NoClassDefFoundError: com/ibm/logging/LoggerCfg
[wsadmin] Java Result: 105
------------------------------------------------------------------
Apparently it could not find the classes com/ibm/logging/LoggerCfg and com/sun/mail/util/BASE64DecoderStream. I could not find them either under C:\Program Files\WebSphere\AppServer\lib. Does any one know where they are? or better yet, is there another scripts or ant tasks that helps us setup the correct classpath so we don't have to look through all the jar files each time we run a different ant tasks. It is very time consuming and tedious.
James Ng
[email protected]