You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Alan Brown <ab...@symyx.com> on 2004/08/20 22:49:44 UTC
OutOfMemory...
I'm using <subant> with genericAntFile to run an ant task against every
subdirectory. However, it runs out of memory before finishing. I've
done some poking around and it seems that <subant> like <antcall> has
some issues with the classLoader that can result in this kind of
problem. Does anyone know a workaround? I really want to be able to
use <subant> with genericAntFile if I can, as it really suits my
problem, but my problem isn't well suited to having the task run out of
memory before completion...
Alan
Ps. Here's my code...
PPS. The custom and task that I wrote is 'null'ed at the end of each use
and I call System.gc() (in hope more than expectation)
<subant target="generateSrcAndSchema"
genericantfile="sourceCodeBuild.xml"
inheritall="true"
failonerror="false">
<dirset dir="${build}">
<include name="*"/>
</dirset>
</subant>
.
.
.
.
<target name="generateSrcAndSchema" depends="defineRc">
<basename property="currentDir" file="${basedir}"/>
<rc jar="${schema.jar}"
copyright="${schema.copyright}"
generateDropScript="false"
sqldir="${oraDir}/"
metadatadir="${metadataDir}"
schemadir="schema"
proxydir="${proxyDir}"
generateProxies="true"
schemaName="${currentDir}2">
<fileset dir=".">
<include name="**/*.meta"/>
</fileset>
</redc>
</target>
.
.
.
.
<target name="defineRc">
<taskdef name="rc"
classpathref="rc.classpath"
classname="com.metadata.MetadataCompilerAntTask"/>
</target>
=======
Notice: This e-mail message, together with any attachments, contains
information of Symyx Technologies, Inc. that may be confidential,
proprietary, copyrighted, privileged and/or protected work product,
and is meant solely for the intended recipient. If you are not the
intended recipient, and have received this message in error, please
contact the sender immediately, permanently delete the original and
any copies of this email and any attachments thereto.
Re: OutOfMemory...
Posted by Pedro Sam <ps...@liberate.com>.
Alan Brown wrote:
> I'm using <subant> with genericAntFile to run an ant task against every
> subdirectory. However, it runs out of memory before finishing. I've
> done some poking around and it seems that <subant> like <antcall> has
> some issues with the classLoader that can result in this kind of
> problem. Does anyone know a workaround? I really want to be able to
> use <subant> with genericAntFile if I can, as it really suits my
> problem, but my problem isn't well suited to having the task run out of
> memory before completion...
Try using <macrodef> ... I encountered that problem from a while ago, and
<macrodef> seem to have fixed the problem.
Pedro
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
Re: OutOfMemory...
Posted by Peter Reilly <pe...@apache.org>.
You could try placing the taskdef in the top level build
file.
Peter
Alan Brown wrote:
>I'm using <subant> with genericAntFile to run an ant task against every
>subdirectory. However, it runs out of memory before finishing. I've
>done some poking around and it seems that <subant> like <antcall> has
>some issues with the classLoader that can result in this kind of
>problem. Does anyone know a workaround? I really want to be able to
>use <subant> with genericAntFile if I can, as it really suits my
>problem, but my problem isn't well suited to having the task run out of
>memory before completion...
>
>
>
>Alan
>
>
>
>Ps. Here's my code...
>
>PPS. The custom and task that I wrote is 'null'ed at the end of each use
>and I call System.gc() (in hope more than expectation)
>
>
>
><subant target="generateSrcAndSchema"
>genericantfile="sourceCodeBuild.xml"
>
> inheritall="true"
>
> failonerror="false">
>
> <dirset dir="${build}">
>
> <include name="*"/>
>
> </dirset>
>
> </subant>
>
>
>
>.
>
>.
>
>.
>
>.
>
>
>
><target name="generateSrcAndSchema" depends="defineRc">
>
> <basename property="currentDir" file="${basedir}"/>
>
> <rc jar="${schema.jar}"
>
> copyright="${schema.copyright}"
>
> generateDropScript="false"
>
> sqldir="${oraDir}/"
>
> metadatadir="${metadataDir}"
>
> schemadir="schema"
>
> proxydir="${proxyDir}"
>
> generateProxies="true"
>
> schemaName="${currentDir}2">
>
>
>
> <fileset dir=".">
>
> <include name="**/*.meta"/>
>
> </fileset>
>
> </redc>
>
> </target>
>
>.
>
>.
>
>.
>
>.
>
>
>
><target name="defineRc">
>
> <taskdef name="rc"
>
> classpathref="rc.classpath"
>
> classname="com.metadata.MetadataCompilerAntTask"/>
>
> </target>
>
>
>
>
>
>
>
>=======
>Notice: This e-mail message, together with any attachments, contains
>information of Symyx Technologies, Inc. that may be confidential,
>proprietary, copyrighted, privileged and/or protected work product,
>and is meant solely for the intended recipient. If you are not the
>intended recipient, and have received this message in error, please
>contact the sender immediately, permanently delete the original and
>any copies of this email and any attachments thereto.
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org