You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by ul73 <pa...@stud.uni-karlsruhe.de> on 2002/01/31 16:01:58 UTC
out of memory error using ant/xalan
hi,
i am using
ant 1.4.1
xalan-j_2_3_D1
xerces-2_0_0
jdk 1.3.1 and jdk 1.4.0-rc
my project does lots of xsl transformation, and I always run into
the following error:
BUILD FAILED
java.lang.OutOfMemoryError
is this problem known?
i am using a styleshet to generate ant project files:
build
-> (1-1)
generates "modules_to_build"
-> (1-n)
generates "moduleX_build_file"
this "n"-moduleX_build_file are started using <ant
antfile="moduleX_build_file"/>.
if i just start 1 or 2 moduleX processes - no problem. as soon as it
generates 3 or
more moduleX process i get the memory error.
HELP!!!
brgds
papick
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: out of memory error using ant/xalan
Posted by David Stagner <ds...@nmdp.org>.
ul73 wrote:
> hi,
>
> i am using
> ant 1.4.1
> xalan-j_2_3_D1
> xerces-2_0_0
>
> jdk 1.3.1 and jdk 1.4.0-rc
>
>
> my project does lots of xsl transformation, and I always run into
> the following error:
>
> BUILD FAILED
>
> java.lang.OutOfMemoryError
>
> is this problem known?
>
> i am using a styleshet to generate ant project files:
>
> build
> -> (1-1)
> generates "modules_to_build"
> -> (1-n)
> generates "moduleX_build_file"
>
> this "n"-moduleX_build_file are started using <ant
> antfile="moduleX_build_file"/>.
> if i just start 1 or 2 moduleX processes - no problem. as soon as it
> generates 3 or
> more moduleX process i get the memory error.
You didn't say what operating system you're running on. That's a
strange error for any Unix... are you using Windows 98/ME? If so, i'll
bet you're running out of low 640k somehow, the DOS legacy of that junk.
I've seen W98 boxes with 256M that couldn't run two applications at
once. Try it under NT/2000/XP and the problem should go away.
If you're actually running some real OS like Unix or an NT-derived
Windows, then look at your system process management tools and see if
there is some control limiting maximum memory to a process, or if there
is a well-known memory leak associated with Java on that platform.
--
David Stagner
National Marrow Donor Program
3001 Broadway Street NE
Broadway Ridge Suite 500
Minneapolis, MN 55413
Email: dstagner@nmdp.org
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: Xalan 2.2.0 exceptions fail the style task for multiple sources
Posted by "Frank E. Weiss" <fr...@well.com>.
I have duplicated the NullPointer and ArrayIndexOutOfBounds exceptions with a stand-alone test. I have joined the xalan-j mail
list to try to resolve this problem. I'll give feedback to Ant if necessary. BTW the failure is sensitive to the order and
number of input documents you try to transform. Here's the stand-alone code that bombs when trying to do 2 or more transforms
while reusing the stylesheet:
public static void exampleTransformerReuse(Vector sources, String xslID)
throws TransformerException, TransformerConfigurationException
{
TransformerFactory tfactory = TransformerFactory.newInstance();
Transformer transformer = tfactory.newTransformer(new StreamSource(baseDir + xslID));
for (Enumeration e=sources.elements(); e.hasMoreElements(); )
{
String sourceID = (String)e.nextElement();
System.out.println("\n=========" + sourceID + "\n");
transformer.transform( new StreamSource(baseDir + sourceID),
new StreamResult(destDir + sourceID));
}
}
P.S. I used the Xalan examples trax code instead of the Ant TraxLiaison code. They both gave me identical exception behavior,
even though the Ant code takes some precautions to close the files after each tranformation.
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: out of memory error using ant/xalan
Posted by "Frank E. Weiss" <fr...@well.com>.
Yup. I just changed a Style task with includes to individual Style tasks for each file with in and out. That seems to work,
at least in my case. I'm going to crack open the Ant source now and look at how Xalan 2.0.1 and Xalan 2.2.0 APIs have
changed.
"Frank E. Weiss" wrote:
> I've also been having problems using Xalan 2.2.0 with Ant 1.4.1. In my case everything works fine with Xalan 2.0.1. But
> with Xalan 2.2.0, Ant only completes a few transformations before the build fails with a Xalan exception. When I
> hand-run the failed stylesheet using Xalan 2.2.0, it's OK. I'm suspecting a Xalan 2.2.0 / JVM problem (using JDK 1.3.1),
> but it may have something to do with the way Ant executes the Style task.
>
> ul73 wrote:
>
> > hi,
> >
> > i am using
> > ant 1.4.1
> > xalan-j_2_3_D1
> > xerces-2_0_0
> >
> > jdk 1.3.1 and jdk 1.4.0-rc
> >
> > my project does lots of xsl transformation, and I always run into
> > the following error:
> >
> > BUILD FAILED
> >
> > java.lang.OutOfMemoryError
> >
> > is this problem known?
> >
> > i am using a styleshet to generate ant project files:
> >
> > build
> > -> (1-1)
> > generates "modules_to_build"
> > -> (1-n)
> > generates "moduleX_build_file"
> >
> > this "n"-moduleX_build_file are started using <ant
> > antfile="moduleX_build_file"/>.
> > if i just start 1 or 2 moduleX processes - no problem. as soon as it
> > generates 3 or
> > more moduleX process i get the memory error.
> >
> > HELP!!!
> >
> > brgds
> >
> > papick
> >
> > --
> > To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> > For additional commands, e-mail: <ma...@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: out of memory error using ant/xalan
Posted by "Frank E. Weiss" <fr...@well.com>.
I've also been having problems using Xalan 2.2.0 with Ant 1.4.1. In my case everything works fine with Xalan 2.0.1. But
with Xalan 2.2.0, Ant only completes a few transformations before the build fails with a Xalan exception. When I
hand-run the failed stylesheet using Xalan 2.2.0, it's OK. I'm suspecting a Xalan 2.2.0 / JVM problem (using JDK 1.3.1),
but it may have something to do with the way Ant executes the Style task.
ul73 wrote:
> hi,
>
> i am using
> ant 1.4.1
> xalan-j_2_3_D1
> xerces-2_0_0
>
> jdk 1.3.1 and jdk 1.4.0-rc
>
> my project does lots of xsl transformation, and I always run into
> the following error:
>
> BUILD FAILED
>
> java.lang.OutOfMemoryError
>
> is this problem known?
>
> i am using a styleshet to generate ant project files:
>
> build
> -> (1-1)
> generates "modules_to_build"
> -> (1-n)
> generates "moduleX_build_file"
>
> this "n"-moduleX_build_file are started using <ant
> antfile="moduleX_build_file"/>.
> if i just start 1 or 2 moduleX processes - no problem. as soon as it
> generates 3 or
> more moduleX process i get the memory error.
>
> HELP!!!
>
> brgds
>
> papick
>
> --
> To unsubscribe, e-mail: <ma...@jakarta.apache.org>
> For additional commands, e-mail: <ma...@jakarta.apache.org>
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>