Hi,
currently developing an ANT script to apply a load of business config. I can stop both Windchill and TOMCAT no problem, and re-start TOMCAT co problem. However when I try to restart Windchill, although the server manager and method server start OK, the ANT script hangs and so does not complete steps following teh windchill start.
The ant targets I am using to stop windchill & tomcat, cleare the tomcat cache and restart both tomcat and windchill is as follows:
<target name="stop_servers" depends="loadProps">
<exec executable="${wchome}/bin/windchill.exe">
<arg line="stop"/">
</exec>
<exec executable="net">
<arg line="stop" ${tomservice}"="/>
</exec>
</target>
<target name="clear_cache" depends="stop_servers">
<delete dir="${tomcat_cache}"></delete>
</target>
<target name="start_servers" depends="clear_cache">
<exec executable="net">
<arg line="start" ${tomservice}"="/>
</exec>
<exec executable="${wchome}/bin/windchill.exe">
<arg line="start"/">
</exec>
</target>
Am I doing something wrong or is this an issue?
Using 9.1 M062 by the way on a Windows server.
Cheers
Simon Lucas
Hi,
I've already met this problem when starting up the server. I've solved it using the following script:
<echo>processing windchillStart</echo>
<exec dir="${wt.home}${file.separator}bin" executable="windchill" vmlauncher="false">
<arg value="start"/>
</exec>
Be aware of something by using these scripts : if your Windchill servers usually start as Windows Services, the stop and start scripts will result in new processes created by the logged user and
Here are ANT targets (that can be added to your ANT project) to start and stop Tomcat and server Manager/Method Server
These assume Apache is running, and that Tomcart and Server Manager/Method Server are not running as services (we use these command on our development machines as part of the deployment process.
<property name="windchill.home" location="C:/ptc/Windchill_9.1/Windchill"/">
<target name="stopTomcat">
<exec executable="${windchill.home}/../Tomcat/bin/wttomcat_stop.bat"/>
</target>
<target name="startTomcat">
<exec spawn="true" executable="${windchill.home}/../Tomcat/bin/wttomcat_start.bat"/>
</target>
<target name="startMethodServer">
<exec spawn="true" executable="${windchill.home}/bin/windchill.exe">
<arg value="start"/">
</exec>
</target>
<target name="stopMethodServer">
<exec executable="${windchill.home}/bin/windchill.exe">
<arg value="stop"/">
</exec>
</target>
<target name="startServers">
<antcall target="startTomcat"/>
<antcall target="startMethodServer"/>
</target>
<target name="stopServers">
<antcall target="stopTomcat"/>
<antcall target="stopMethodServer"/>
</target>
Let me know if you have any questions.
Thanks -
Todd