ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rene.schuenem...@orange-pages.de
Subject Re: Getting OutOfMemoryErrors with fileset-task
Date Fri, 02 Jun 2006 11:24:23 GMT
Quoting Petar Tahchiev <paranoiabla@gmail.com>:

> On 02/06/06, rene.schuenemann@orange-pages.de
> <rene.schuenemann@orange-pages.de> wrote:
>> Hi,
>>
>> i'm getting OutOfMemory-Errors while executing a fileset-task.
>> My Buildfile looks like this:
>>
>> <project name="foo" default="bar">
>>     <target name="bar">
>>         <mkdir dir="${basedir}/logs/temp"/>
>>         <move failonerror="false" flatten="true"   
>> todir="${basedir}/logs/temp">
>>             <fileset dir="${basedir}/myDir">
>>                 <include name="**/*.xml"/>
>>             </fileset>
>>         </move>
>>         <xslt basedir="${basedir}/logs/temp" destdir="${basedir}/logs"
>> extension=".xml" includes="*testresult*"
>> style="/build/configs/cppunittransform.xsl"/>
>>     </target>
>> </project>
>>
>>
>> This is what ant generates when i'm running the buildfile:
>>
>>
>> Apache Ant version 1.6.5 compiled on June 2 2005
>> Apache Ant version 1.6.5 compiled on June 2 2005
>> Buildfile: build.xml
>> Adding reference: ant.PropertyHelper
>> Detected Java version: 1.5 in:
>> /export/development/systems/linux/8.1b/opt/java/sun/jdk1.5.0_02/jre
>> Detected OS: Linux
>> Adding reference: ant.ComponentHelper
>> Setting ro project property: ant.version -> Apache Ant version 1.6.5 
>> compiled on
>> June 2 2005
>> Setting ro project property: ant.file ->
>> /export/home/r/resc/mnt/serverhome/buildtest/build.xml
>> Adding reference: ant.projectHelper
>> Adding reference: ant.parsing.context
>> Adding reference: ant.targets
>> parsing buildfile 
>> /export/home/r/resc/mnt/serverhome/buildtest/build.xml with
>> URI = file:///export/home/r/resc/mnt/serverhome/buildtest/build.xml
>> Setting ro project property: ant.project.name -> foo
>> Adding reference: foo
>> Setting ro project property: ant.file.foo ->
>> /export/home/r/resc/mnt/serverhome/buildtest/build.xml
>> Project base dir set to: /export/home/r/resc/mnt/serverhome/buildtest
>>  +Target:
>>  +Target: bar
>> Attempting to create object of type 
>> org.apache.tools.ant.helper.DefaultExecutor
>> Adding reference: ant.executor
>> Build sequence for target(s) `bar' is [bar]
>> Complete build sequence is [bar, ]
>>
>> bla:
>> Could not load a dependent class 
>> (com/sun/media/jai/codec/FileSeekableStream)
>> for type image
>> Could not load a dependent class (com/jcraft/jsch/UserInfo) for type sshexec
>> Could not load a dependent class (com/jcraft/jsch/UserInfo) for type scp
>> Could not load a dependent class (jdepend/xmlui/JDepend) for type jdepend
>> Could not load a dependent class (junit/framework/Test) for type junit
>> fileset: Setup scanner in dir 
>> /export/home/r/resc/mnt/serverhome/buildtest/myDir
>> with patternSet{ includes: [**/*.xml] excludes: [] }
>>
>> BUILD FAILED
>> java.lang.OutOfMemoryError: Java heap space
>>         at 
>> org.apache.tools.ant.Project.executeSortedTargets(Project.java:1225)
>>         at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
>>         at
>> org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
>>         at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
>>         at org.apache.tools.ant.Main.runBuild(Main.java:668)
>>         at org.apache.tools.ant.Main.startAnt(Main.java:187)
>>         at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
>>         at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
>> Caused by: java.lang.OutOfMemoryError: Java heap space
>> --- Nested Exception ---
>> java.lang.OutOfMemoryError: Java heap space
>>
>>
>> There are some folders under "${basedir}/myDir". But the strange 
>> thing is, if I
>> set it to a directory with no subfolders, the thask performs very well.
>> I've already set the maximum heap-space to 500m, but that doesn't helps.
>> I changed my jvm to 1.4 with the same result.
>> Has anybody an idea how to fix that?
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>> For additional commands, e-mail: user-help@ant.apache.org
>>
>>
>
> I am not quite sure if this will help but once I read about such a
> problem(although it was in Ant 1.6.4.) and solution was to set the
> "ANT_OPTS" environment  variable to "-Xmx256m".
>
> -- 
> Regards, Petar!
> Karlovo, Bulgaria.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

I have already set the maximum available memory to 256m and 512m. The only
difference is the time it takes to fail with the OutOfMemoryError. Because of
that it looks like a memory-leak.




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


Mime
View raw message