ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sebastien Blanc <Sebastien.Bl...@alcatel.com>
Subject Re: Ant 1.5 java.lang.OutOfMemoryError
Date Wed, 23 Apr 2003 05:37:43 GMT
unless u can get some more memory to -Xmx,  one stuff I tried OK was to fork and
use a java call instead of direct ant call, like
        <java failonerror="true" classname="org.apache.tools.ant.Main"
fork="true">
           <arg line="-Dlog4j.configuration=log4j.properties -f event/build.xml
main"/>
           <classpath refid="ant.class.path" />
        </java>
        <java failonerror="true" classname="org.apache.tools.ant.Main"
fork="true">
           <arg line="-Dlog4j.configuration=log4j.properties -f
tl1adapter/build.xml main"/>
           <classpath refid="ant.class.path" />
        </java>
        <java failonerror="true" classname="org.apache.tools.ant.Main"
fork="true">
           <arg line="-Dlog4j.configuration=log4j.properties -f dao/build.xml
main"/>
           <classpath refid="ant.class.path" />
        </java>
and so on,
with
      <path id="ant.class.path">
          <fileset dir="${ejbenv.JAVA_HOME}/lib">
             <include name="tools.jar" />
          </fileset>
          <fileset dir="${ejbenv.ANT_HOME}/lib">
             <include name="ant.jar" />
          </fileset>
          <fileset dir="${ejbenv.CONT_HOME}/">
             <include name="ant-contrib-0.1.jar" />
          </fileset>
          <fileset dir="${ejbenv.MAVEN_HOME}/repository/jaxp/jars">
             <include name="jaxp-1.2.jar" />
          </fileset>
          <fileset dir="${ejbenv.MAVEN_HOME}/repository/xml-apis/jars">
             <include name="xml-apis-2.0.2.jar" />
          </fileset>
          <fileset dir="${ejbenv.MAVEN_HOME}/repository/xalan/jars">
             <include name="xalan-2.3.1.jar" />
          </fileset>
          <fileset dir="${ejbenv.MAVEN_HOME}/lib">
             <include name="commons-logging-1.0.1.jar" />
          </fileset>
       </path>
this slows the whole stuff though + logging needs to use 'concat' but alrite.
seb.

Richard Hill wrote:

> Hi,
> I'm running a build file that calls up to 40 other ant files in series.
>
> <target name="test" depends="clean">
>     <ant antfile="test1.xml"/>
>     <ant antfile="test2.xml"/>
>       .
>       .
>     <ant antfile="test40.xml"/>
> </target>
>
> The problem is that I get the following error get to the 32n'd test:
>
> java.lang.OutOfMemoryError
>         <<no stack trace available>>
> Exception in thread "main" java.lang.OutOfMemoryError
>         <<no stack trace available>>
>
> I'm running Ant 1.5 and java 1.3.1_04 on both Linux RH 8, and Win2K. My
> linux box has 1.9GB of swap, and 1006MB memory.
>
> I declared ANT_OPTS="-Xms128m -Xmx512m" in my .bashrc file...and I still get
> this error (Can I declare this in my parent ant file? If so, how?)
>
> Any suggestions on how to increase the memory?
>
> Thanks,
> Richard
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message