Project

Profile

Help

net.sf.saxon.om.FastStringBuffer.ensureCapaci

Added by Anonymous almost 15 years ago

Legacy ID: #7422359 Legacy Poster: La carotte (lacarotte)

Hi, I'm using Saxon XSLT processor (9.1.0.6) to make an XML transformation but I got this exception when the input file is big (25Mo). I've tried to set up the JVM memory options (Xmx & MaxPermSize) up to 1.5Go but that still fails. Any help would be appreciated. La carotte. Here is the stack trace : Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at net.sf.saxon.om.FastStringBuffer.ensureCapacity(FastStringBuffer.java:413) at net.sf.saxon.om.FastStringBuffer.append(FastStringBuffer.java:104) at net.sf.saxon.tinytree.LargeStringBuffer.append(LargeStringBuffer.java:77) at net.sf.saxon.tinytree.TinyTree.appendChars(TinyTree.java:350) at net.sf.saxon.tinytree.TinyBuilder.characters(TinyBuilder.java:330) at net.sf.saxon.event.Stripper.characters(Stripper.java:258) at net.sf.saxon.event.ReceivingContentHandler.flush(ReceivingContentHandler.java:549) at net.sf.saxon.event.ReceivingContentHandler.endElement(ReceivingContentHandler.java:442) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.scanEndElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Sourc e) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:220) at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.JAXPSAXProcessorInvoker.transform(JAXPSAXProcessorInvoker.java:186) at org.eclipse.wst.xsl.jaxp.debug.invoker.internal.Main.main(Main.java:73)


Replies (4)

Please register to reply

RE: net.sf.saxon.om.FastStringBuffer.ensureCapaci - Added by Anonymous almost 15 years ago

Legacy ID: #7422420 Legacy Poster: Michael Kay (mhkay)

A 25Mb input file should certainly be transformable if you allocate a 1Gb heap to the Java VM, so it's not clear what's going wrong here. I see you're running from Eclipse. Could you try running the same transformation from the command line? That will tell us whether or not the problem is related to Eclipse. Michael Kay Saxonica

RE: net.sf.saxon.om.FastStringBuffer.ensureCapaci - Added by Anonymous almost 15 years ago

Legacy ID: #7422521 Legacy Poster: La carotte (lacarotte)

Hi Michael, Thanks for your quick answer. I've tried to run the transformation directly with Saxon from the command line : java -XX:PermSize=1600m -XX:MaxPermSize=1600m -DXms1600m -DXmx1600m -Djava.ext.dirs=f:\saxon net.sf.saxon.Transform -s:input.xml -xsl:transform.xsl -o:output.xml I also tried different Saxon option like -ds -dtd:off -strip:ignorable .... But that still fails. Here is the stack trace I got : Building tree for file:input.xml using class net.sf.saxon.tinytree.TinyBuilder Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at net.sf.saxon.tinytree.TinyTree.condense(TinyTree.java:375) at net.sf.saxon.tinytree.TinyBuilder.close(TinyBuilder.java:177) at net.sf.saxon.event.ReceivingContentHandler.endDocument(ReceivingContentHandler.java:219) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endDocument(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.endEntity(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.endEntity(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.load(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLEntityScanner.skipSpaces(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dispatch(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at net.sf.saxon.event.Sender.sendSAXSource(Sender.java:404) at net.sf.saxon.event.Sender.send(Sender.java:214) at net.sf.saxon.event.Sender.send(Sender.java:50) at net.sf.saxon.Controller.transform(Controller.java:1611) at net.sf.saxon.Transform.processFile(Transform.java:1112) at net.sf.saxon.Transform.doTransform(Transform.java:719) at net.sf.saxon.Transform.main(Transform.java:66) La Carotte -------------- A 25Mb input file should certainly be transformable if you allocate a 1Gb heap to the Java VM, so it's not clear what's going wrong here. I see you're running from Eclipse. Could you try running the same transformation from the command line? That will tell us whether or not the problem is related to Eclipse. Michael Kay Saxonica

RE: net.sf.saxon.om.FastStringBuffer.ensureCapaci - Added by Anonymous almost 15 years ago

Legacy ID: #7422528 Legacy Poster: Michael Kay (mhkay)

I don't know where you get all these options from. I use http://java.sun.com/j2se/1.5.0/docs/tooldocs/windows/java.html The option I use for setting heap size is -Xms2048m No -D involved - that's for setting Java system properties.

RE: net.sf.saxon.om.FastStringBuffer.ensureCapaci - Added by Anonymous almost 15 years ago

Legacy ID: #7422548 Legacy Poster: La carotte (lacarotte)

Thanks a lot, my mistake with -DXms.... For XX options have a look at : http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp La carotte.

    (1-4/4)

    Please register to reply