ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Antoine Levy-Lambert" <anto...@gmx.de>
Subject RE: <java fork="true"> does not detect process termination
Date Mon, 23 Aug 2004 16:52:32 GMT
Maybe the weblogic.Admin class does not close properly its stdout/stderr
buffers, and ant believes that it should wait for some output ????
This would be my explanation.
Can you try to write a shell script to do the same as what you are doing
with ant and see how it behaves ?

Another possibility is that the weblogic.Admin class is waiting for
something to come on standard in (like "Do you confirm you want to shut down
the server Y/N" and the ant build file does not supply the expected "Y"
(just a thought).

Antoine


> The class does finish, as well as weblogic.Server. The problem is with the
> ant process itself, the one that launched weblogic.Server, which does not
> terminate for some reason.
> 
> >  -----Original Message-----
> > From: 	"Antoine Levy-Lambert" <antoine@gmx.de>@SUNGARD  
> > Sent:	lundi 23 août 2004 18:11
> > To:	Ant Users List
> > Subject:	Re: <java fork="true"> does not detect process termination
> > 
> > Hello Patrick,
> > this class weblogic.Admin should be able to finish when the weblogic
> > server
> > is stopped.
> > 
> > As a workaround you may add the attribute spawn="true" to your <java>
> tag.
> > Then ant will not wait on the java process to return
> > 
> > Antoine
> > 
> > > Hi,
> > >
> > > I start a weblogic managed server with the following target:
> > >
> > > <target name="startwlm" if="server.name" depends="init-wl">
> > >   <java classname="weblogic.Server" fork="yes"
> > > dir="${applications.dir}/.."
> > > >
> > >     <sysproperty key="java.library.path" path="${weblogic.home}/bin"/>
> > >     <classpath refid="weblogic.class.path"/>
> > >     <jvmarg line="${weblogic.jvm.args}"/>
> > >     <jvmarg value="-Dbea.home=${bea.home}"/>
> > >     <jvmarg value="-Dweblogic.Domain=${weblogic.domain.name}"/>
> > >     <jvmarg value="-Dweblogic.Name=${server.name}"/>
> > >     <jvmarg
> > > value="-Dweblogic.management.username=${weblogic.server.username}"/>
> > >     <jvmarg
> > > value="-Dweblogic.management.password=${weblogic.server.password}"/>
> > >     <jvmarg
> > >
> >
> value="-Dweblogic.management.server=${weblogic.server.host}:${weblogic.ser
> > ve
> > > r.port}"/>
> > >     <jvmarg value="-Ddomain.dir=${weblogic.domain.dir}"/>
> > >     <jvmarg
> > > value="-Djava.security.policy=${weblogic.home}/lib/weblogic.policy"/>
> > >   </java>
> > > </target>
> > >
> > > In order to shutdown this process, I call an other target like this:
> > >
> > > <target name="stopwlm" if="server.name" depends="init">
> > >   <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
> > >   <propertycopy name="port" from="${server.name}.port"/>
> > >   <java classname="weblogic.Admin" fork="yes"
> > > dir="${applications.dir}/..">
> > >     <sysproperty key="java.library.path" path="${weblogic.home}/bin"/>
> > >     <classpath location="${weblogic.home}/lib/weblogic.jar"/>
> > >     <arg line="-url ${weblogic.server.host}:${port}"/>
> > >     <arg line="-username ${weblogic.server.username}"/>
> > >     <arg line="-password ${weblogic.server.password}"/>
> > >     <arg value="SHUTDOWN"/>
> > >   </java>
> > > </target>
> > >
> > > The weblogic server instance shuts down correctly (the process ID
> > > disappears) but the ant process that ran startwlm does not return and
> > > continues waiting. This problem exists in ant 1.5.3 and 1.6.2.
> > >
> > > I do the same thing with the admin server and it works fine.
> > >
> > > Does anyone have an idea of what I am doing wrong here?
> > >
> > > Thanks in advance,
> > >
> > > Patrick.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message