You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Alexander Schatten <al...@gmx.net> on 2001/03/27 22:06:56 UTC

Bug in Cocoon rendering bigger XML files to PDF??

I just wrote a xsl:fo to render a XML file to PDF.

testing it with a smaller XML file works perfectly (result are about 30
pages).

Then I replaced the small test XML with the regular xml file (about
2MB), Cocoon starts rendering, shows up to nearly 300 pages, NO error,
seems to finish, but then starts again from the beginning, from page
1... 300 again and again...

this should be a bug, no?



Alex


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Transforming Big XML Files

Posted by Alessandro Marcellini <am...@tiscalinet.it>.
Thank you very mutch for your suggestions!!

But I think I'm not so skilled in java programming to be able to find the
bug!

Thank's again
    Alessandro

Vadim Gritsenko wrote:

> > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> >
> > It seems that using your suggestions, it works ...
> > But: why I can not use both Xalan and Saxon?
> > It is a bug ... or what?
>
> >From your exception stacktrace... Looks like bug. But I'm not sure what
> causing it and were bug is: in xalan, saxon, xerces, ... And, according
> to you, it happens only when transforming large files.
>
> If you want, you can try and find this bug. It should not be too hard -
> if it is well reproducible.
>
> Vadim
>
>
> > Vadim Gritsenko wrote:
> >
> > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > >
> > > > Vadim Gritsenko wrote:
> > > >
> > > > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > > > >
> > > > > > Vadim Gritsenko wrote:
> > > > > >
> > > > > > > > From: Alessandro Marcellini
> [mailto:amarcell@tiscalinet.it]
> > > > > > > >
> > > > > > > > Hi all,
> > > > > > > > I've a problem transforming big xml Files with Xalan
> > > > > > > > or Saxon.
> > > > > > >
> > > > > > > How big are they?
> > > > > >
> > > > > > they are dinamically generated (XSP pages) so have variable
> > > > > > sizes but one of the biggest is 7017 KB
> > > > >
> > > > > I assume you have enough memory for transofmration (java -Xmx)?
> > > >
> > > > I think so ... TOMCAT_OPTS=" -Xmx128m -Xms64m "
> > > >
> > > >
> > > > > > > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > > > > > > So, using Xalan, C2 throws an exception (No more DTM
> available
> > > > > ....
> > > > > > > > Known problem of Xalan)
> > > > > > > > using Saxon C2 throws this strange exception:
> > > > > > > > Original exception : java.lang.ClassCastException:
> > > > > > > > com.icl.saxon.Controller at
> > > > > > > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > > > > > > newTransformerHandler(TransformerFactoryImpl.java:670)
> > > > >
> > > > > This line look strange to me: why org.apache.xalan involved when
> you
> > > > > use saxon?
> > > > >
> > > > > Why don't you try without xalan in the classpath?
> > > >
> > > > So, I like to use both:
> > >
> > > But for the debug purposes, can you try running cocoon with only one
> > > xslt processor, saxon, to see what result will you get?
> > >
> > > Also, try adding to TOMCAT_OPTIONS:
> > > -Djavax.xml.transform.TransformerFactory=com.icl.saxon.
> > > TransformerFactoryImpl
> > >
> > > Vadim
> > >
> > > > I defined a component
> > > > "<component ... "
> > > > with:
> > > > <parameter name="transformer-factory"
> > > > value="com.icl.saxon.TransformerFactoryImpl"/>
> > > >
> > > > ." that uses Saxon in cocoon.xconf
> > > > and i defined another transformer (xslt-saxon) that calls this
> > > > component with:
> > > > "<xslt-processor-role>org.apache.cocoon.components.xslt.
> > > > XSLTProcessor/Saxon</xslt-processor-role>"
> > > >
> > > > In WEB-INF/lib there is saxon652.jar
> > > > Here are the coplete extracts of my cocoon.xconf and sitemap.xmap:
> > > >
> > > > # cocoon.xconf
> > > > <component
> > > >     role="org.apache.cocoon.components.xslt.XSLTProcessor/Saxon"
> > > >     class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
> > > >     logger="core.xslt-processor">
> > > >   <parameter name="use-store" value="true"/>
> > > >   <parameter name="incremental-processing" value="false"/>
> > > >   <parameter name="transformer-factory"
> > > > value="com.icl.saxon.TransformerFactoryImpl"/>
> > > > </component>
> > > >
> > > > # sitemap.xmap
> > > > <map:transformer name="xslt-saxon" pool-grow="2" pool-max="32"
> > > > pool-min="8"
> > > >        src="org.apache.cocoon.transformation.TraxTransformer">
> > > >     <use-request-parameters>false</use-request-parameters>
> > > >
> <use-browser-capabilities-db>false</use-browser-capabilities-db>
> > > >
> > > > <xslt-processor-role>org.apache.cocoon.components.xslt.
> > > > XSLTProcessor/Saxon</xslt-processor-role>
> > > >   </map:transformer>
> > > >
> > > >
> > > > > > > Does Saxon works for you on small files?
> > > > > >
> > > > > > Yes, It work's fine (really faster than Xalan).
> > > > >
> > > > > (same here).
> > > > >
> > > > > > > > So, what can I do?
> > > > > > > > I've to give up to transform big xml files?
> > > > > > > > (Note that there are no problems transforming this files
> using
> > > > > > > > Xalan or Saxon but commandline!!)
> > > > >
> > > > > (I failed once to transform 100Mb file using command line tool,
> > > > > instant saxon).
> > > > >
> > > > > Vadim
> > > > >
> > > > > > > > Bye & thanks
> > > > > > > >
> > > > > > > >     Alessandro
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Transforming Big XML Files

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> 
> It seems that using your suggestions, it works ...
> But: why I can not use both Xalan and Saxon?
> It is a bug ... or what?

>From your exception stacktrace... Looks like bug. But I'm not sure what
causing it and were bug is: in xalan, saxon, xerces, ... And, according
to you, it happens only when transforming large files.

If you want, you can try and find this bug. It should not be too hard -
if it is well reproducible.

Vadim

 
> Vadim Gritsenko wrote:
> 
> > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > >
> > > Vadim Gritsenko wrote:
> > >
> > > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > > >
> > > > > Vadim Gritsenko wrote:
> > > > >
> > > > > > > From: Alessandro Marcellini
[mailto:amarcell@tiscalinet.it]
> > > > > > >
> > > > > > > Hi all,
> > > > > > > I've a problem transforming big xml Files with Xalan
> > > > > > > or Saxon.
> > > > > >
> > > > > > How big are they?
> > > > >
> > > > > they are dinamically generated (XSP pages) so have variable 
> > > > > sizes but one of the biggest is 7017 KB
> > > >
> > > > I assume you have enough memory for transofmration (java -Xmx)?
> > >
> > > I think so ... TOMCAT_OPTS=" -Xmx128m -Xms64m "
> > >
> > >
> > > > > > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > > > > > So, using Xalan, C2 throws an exception (No more DTM
available
> > > > ....
> > > > > > > Known problem of Xalan)
> > > > > > > using Saxon C2 throws this strange exception:
> > > > > > > Original exception : java.lang.ClassCastException:
> > > > > > > com.icl.saxon.Controller at
> > > > > > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > > > > > newTransformerHandler(TransformerFactoryImpl.java:670)
> > > >
> > > > This line look strange to me: why org.apache.xalan involved when
you
> > > > use saxon?
> > > >
> > > > Why don't you try without xalan in the classpath?
> > >
> > > So, I like to use both:
> >
> > But for the debug purposes, can you try running cocoon with only one
> > xslt processor, saxon, to see what result will you get?
> >
> > Also, try adding to TOMCAT_OPTIONS:
> > -Djavax.xml.transform.TransformerFactory=com.icl.saxon.
> > TransformerFactoryImpl
> >
> > Vadim
> >
> > > I defined a component
> > > "<component ... "
> > > with:
> > > <parameter name="transformer-factory"
> > > value="com.icl.saxon.TransformerFactoryImpl"/>
> > >
> > > ." that uses Saxon in cocoon.xconf
> > > and i defined another transformer (xslt-saxon) that calls this
> > > component with:
> > > "<xslt-processor-role>org.apache.cocoon.components.xslt.
> > > XSLTProcessor/Saxon</xslt-processor-role>"
> > >
> > > In WEB-INF/lib there is saxon652.jar
> > > Here are the coplete extracts of my cocoon.xconf and sitemap.xmap:
> > >
> > > # cocoon.xconf
> > > <component
> > >     role="org.apache.cocoon.components.xslt.XSLTProcessor/Saxon"
> > >     class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
> > >     logger="core.xslt-processor">
> > >   <parameter name="use-store" value="true"/>
> > >   <parameter name="incremental-processing" value="false"/>
> > >   <parameter name="transformer-factory"
> > > value="com.icl.saxon.TransformerFactoryImpl"/>
> > > </component>
> > >
> > > # sitemap.xmap
> > > <map:transformer name="xslt-saxon" pool-grow="2" pool-max="32"
> > > pool-min="8"
> > >        src="org.apache.cocoon.transformation.TraxTransformer">
> > >     <use-request-parameters>false</use-request-parameters>
> > >
<use-browser-capabilities-db>false</use-browser-capabilities-db>
> > >
> > > <xslt-processor-role>org.apache.cocoon.components.xslt.
> > > XSLTProcessor/Saxon</xslt-processor-role>
> > >   </map:transformer>
> > >
> > >
> > > > > > Does Saxon works for you on small files?
> > > > >
> > > > > Yes, It work's fine (really faster than Xalan).
> > > >
> > > > (same here).
> > > >
> > > > > > > So, what can I do?
> > > > > > > I've to give up to transform big xml files?
> > > > > > > (Note that there are no problems transforming this files
using
> > > > > > > Xalan or Saxon but commandline!!)
> > > >
> > > > (I failed once to transform 100Mb file using command line tool,
> > > > instant saxon).
> > > >
> > > > Vadim
> > > >
> > > > > > > Bye & thanks
> > > > > > >
> > > > > > >     Alessandro


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Transforming Big XML Files

Posted by Alessandro Marcellini <am...@tiscalinet.it>.
It seems that using your suggestions, it works ...
But: why I can not use both Xalan and Saxon?
It is a bug ... or what?

Vadim Gritsenko wrote:

> > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> >
> > Vadim Gritsenko wrote:
> >
> > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > >
> > > > Vadim Gritsenko wrote:
> > > >
> > > > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > > > >
> > > > > > Hi all,
> > > > > > I've a problem transforming big xml Files with Xalan
> > > > > > or Saxon.
> > > > >
> > > > > How big are they?
> > > >
> > > > they are dinamically generated (XSP pages) so have variable sizes
> > > > but one of the biggest is 7017 KB
> > >
> > > I assume you have enough memory for transofmration (java -Xmx)?
> >
> > I think so ... TOMCAT_OPTS=" -Xmx128m -Xms64m "
> >
> >
> > > > > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > > > > So, using Xalan, C2 throws an exception (No more DTM available
> > > ....
> > > > > > Known problem of Xalan)
> > > > > > using Saxon C2 throws this strange exception:
> > > > > > Original exception : java.lang.ClassCastException:
> > > > > > com.icl.saxon.Controller at
> > > > > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > > > > newTransformerHandler(TransformerFactoryImpl.java:670)
> > >
> > > This line look strange to me: why org.apache.xalan involved when you
> use
> > > saxon?
> > >
> > > Why don't you try without xalan in the classpath?
> >
> > So, I like to use both:
>
> But for the debug purposes, can you try running cocoon with only one
> xslt processor, saxon, to see what result will you get?
>
> Also, try adding to TOMCAT_OPTIONS:
> -Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactor
> yImpl
>
> Vadim
>
> > I defined a component
> > "<component ... "
> > with:
> > <parameter name="transformer-factory"
> > value="com.icl.saxon.TransformerFactoryImpl"/>
> >
> > ." that uses Saxon in cocoon.xconf
> > and i defined another transformer (xslt-saxon) that calls this
> component
> > with:
> > "<xslt-processor-
> >
> role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-process
> or-
> > role>"
> >
> > In WEB-INF/lib there is saxon652.jar
> > Here are the coplete extracts of my cocoon.xconf and sitemap.xmap:
> >
> > # cocoon.xconf
> > <component
> >     role="org.apache.cocoon.components.xslt.XSLTProcessor/Saxon"
> >     class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
> >     logger="core.xslt-processor">
> >   <parameter name="use-store" value="true"/>
> >   <parameter name="incremental-processing" value="false"/>
> >   <parameter name="transformer-factory"
> > value="com.icl.saxon.TransformerFactoryImpl"/>
> > </component>
> >
> > # sitemap.xmap
> > <map:transformer name="xslt-saxon" pool-grow="2" pool-max="32"
> pool-min="8"
> >        src="org.apache.cocoon.transformation.TraxTransformer">
> >     <use-request-parameters>false</use-request-parameters>
> >     <use-browser-capabilities-db>false</use-browser-capabilities-db>
> >
> > <xslt-processor-
> >
> role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-process
> or-
> > role>
> >
> >   </map:transformer>
> >
> >
> > > > > Does Saxon works for you on small files?
> > > >
> > > > Yes, It work's fine (really faster than Xalan).
> > >
> > > (same here).
> > >
> > > > > > So, what can I do?
> > > > > > I've to give up to transform big xml files?
> > > > > > (Note that there are no problems transforming this files using
> > > > > > Xalan or Saxon but commandline!!)
> > >
> > > (I failed once to transform 100Mb file using command line tool,
> instant
> > > saxon).
> > >
> > > Vadim
> > >
> > > > > > Bye & thanks
> > > > > >
> > > > > >     Alessandro
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Transforming Big XML Files

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> 
> Vadim Gritsenko wrote:
> 
> > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > >
> > > Vadim Gritsenko wrote:
> > >
> > > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > > >
> > > > > Hi all,
> > > > > I've a problem transforming big xml Files with Xalan
> > > > > or Saxon.
> > > >
> > > > How big are they?
> > >
> > > they are dinamically generated (XSP pages) so have variable sizes
> > > but one of the biggest is 7017 KB
> >
> > I assume you have enough memory for transofmration (java -Xmx)?
> 
> I think so ... TOMCAT_OPTS=" -Xmx128m -Xms64m "
> 
> 
> > > > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > > > So, using Xalan, C2 throws an exception (No more DTM available
> > ....
> > > > > Known problem of Xalan)
> > > > > using Saxon C2 throws this strange exception:
> > > > > Original exception : java.lang.ClassCastException:
> > > > > com.icl.saxon.Controller at
> > > > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > > > newTransformerHandler(TransformerFactoryImpl.java:670)
> >
> > This line look strange to me: why org.apache.xalan involved when you
use
> > saxon?
> >
> > Why don't you try without xalan in the classpath?
> 
> So, I like to use both:

But for the debug purposes, can you try running cocoon with only one
xslt processor, saxon, to see what result will you get?


Also, try adding to TOMCAT_OPTIONS:
-Djavax.xml.transform.TransformerFactory=com.icl.saxon.TransformerFactor
yImpl


Vadim


> I defined a component
> "<component ... "
> with:
> <parameter name="transformer-factory"
> value="com.icl.saxon.TransformerFactoryImpl"/>
> 
> ." that uses Saxon in cocoon.xconf
> and i defined another transformer (xslt-saxon) that calls this
component
> with:
> "<xslt-processor-
>
role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-process
or-
> role>"
> 
> In WEB-INF/lib there is saxon652.jar
> Here are the coplete extracts of my cocoon.xconf and sitemap.xmap:
> 
> # cocoon.xconf
> <component
>     role="org.apache.cocoon.components.xslt.XSLTProcessor/Saxon"
>     class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
>     logger="core.xslt-processor">
>   <parameter name="use-store" value="true"/>
>   <parameter name="incremental-processing" value="false"/>
>   <parameter name="transformer-factory"
> value="com.icl.saxon.TransformerFactoryImpl"/>
> </component>
> 
> # sitemap.xmap
> <map:transformer name="xslt-saxon" pool-grow="2" pool-max="32"
pool-min="8"
>        src="org.apache.cocoon.transformation.TraxTransformer">
>     <use-request-parameters>false</use-request-parameters>
>     <use-browser-capabilities-db>false</use-browser-capabilities-db>
> 
> <xslt-processor-
>
role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-process
or-
> role>
> 
>   </map:transformer>
> 
> 
> > > > Does Saxon works for you on small files?
> > >
> > > Yes, It work's fine (really faster than Xalan).
> >
> > (same here).
> >
> > > > > So, what can I do?
> > > > > I've to give up to transform big xml files?
> > > > > (Note that there are no problems transforming this files using
> > > > > Xalan or Saxon but commandline!!)
> >
> > (I failed once to transform 100Mb file using command line tool,
instant
> > saxon).
> >
> > Vadim
> >
> > > > > Bye & thanks
> > > > >
> > > > >     Alessandro


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Transforming Big XML Files

Posted by Alessandro Marcellini <am...@tiscalinet.it>.

Vadim Gritsenko wrote:

> > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> >
> > Vadim Gritsenko wrote:
> >
> > > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > > >
> > > > Hi all,
> > > > I've a problem transforming big xml Files with Xalan or Saxon.
> > >
> > > How big are they?
> >
> > they are dinamically generated (XSP pages) so have variable sizes but
> one of
> > the biggest is 7017 KB
>
> I assume you have enough memory for transofmration (java -Xmx)?

I think so ... TOMCAT_OPTS=" -Xmx128m -Xms64m "


>
>
> > > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > > So, using Xalan, C2 throws an exception (No more DTM available
> ....
> > > > Known problem of Xalan)
> > > > using Saxon C2 throws this strange exception:
> > > > Original exception : java.lang.ClassCastException:
> > > > com.icl.saxon.Controller at
> > > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > > newTransformerHandler(TransformerFactoryImpl.java:670)
>
> This line look strange to me: why org.apache.xalan involved when you use
> saxon?
>
> Why don't you try without xalan in the classpath?

So, I like to use both:
I defined a component
"<component ... "
with:
<parameter name="transformer-factory"
value="com.icl.saxon.TransformerFactoryImpl"/>

." that uses Saxon in cocoon.xconf
and i defined another transformer (xslt-saxon) that calls this component
with:
"<xslt-processor-role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-processor-role>"

In WEB-INF/lib there is saxon652.jar
Here are the coplete extracts of my cocoon.xconf and sitemap.xmap:

# cocoon.xconf
<component
    role="org.apache.cocoon.components.xslt.XSLTProcessor/Saxon"
    class="org.apache.cocoon.components.xslt.XSLTProcessorImpl"
    logger="core.xslt-processor">
  <parameter name="use-store" value="true"/>
  <parameter name="incremental-processing" value="false"/>
  <parameter name="transformer-factory"
value="com.icl.saxon.TransformerFactoryImpl"/>
</component>

# sitemap.xmap
<map:transformer name="xslt-saxon" pool-grow="2" pool-max="32" pool-min="8"
       src="org.apache.cocoon.transformation.TraxTransformer">
    <use-request-parameters>false</use-request-parameters>
    <use-browser-capabilities-db>false</use-browser-capabilities-db>

<xslt-processor-role>org.apache.cocoon.components.xslt.XSLTProcessor/Saxon</xslt-processor-role>

  </map:transformer>


>
>
> > > Does Saxon works for you on small files?
> >
> > Yes, It work's fine (really faster than Xalan).
>
> (same here).
>
> > > > So, what can I do?
> > > > I've to give up to transform big xml files?
> > > > (Note that there are no problems transforming this files using
> Xalan
> > > > or Saxon but commandline!!)
>
> (I failed once to transform 100Mb file using command line tool, instant
> saxon).
>
> Vadim
>
> > > > Bye & thanks
> > > >
> > > >     Alessandro
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Transforming Big XML Files

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> 
> Vadim Gritsenko wrote:
> 
> > > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> > >
> > > Hi all,
> > > I've a problem transforming big xml Files with Xalan or Saxon.
> >
> > How big are they?
> 
> they are dinamically generated (XSP pages) so have variable sizes but
one of
> the biggest is 7017 KB

I assume you have enough memory for transofmration (java -Xmx)?


> > > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > > So, using Xalan, C2 throws an exception (No more DTM available
....
> > > Known problem of Xalan)
> > > using Saxon C2 throws this strange exception:
> > > Original exception : java.lang.ClassCastException:
> > > com.icl.saxon.Controller at
> > > org.apache.xalan.processor.TransformerFactoryImpl.
> > > newTransformerHandler(TransformerFactoryImpl.java:670)

This line look strange to me: why org.apache.xalan involved when you use
saxon?

Why don't you try without xalan in the classpath?


> > Does Saxon works for you on small files?
> 
> Yes, It work's fine (really faster than Xalan).

(same here).


> > > So, what can I do?
> > > I've to give up to transform big xml files?
> > > (Note that there are no problems transforming this files using
Xalan
> > > or Saxon but commandline!!)

(I failed once to transform 100Mb file using command line tool, instant
saxon).

Vadim


> > > Bye & thanks
> > >
> > >     Alessandro


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Re: Transforming Big XML Files

Posted by Alessandro Marcellini <am...@tiscalinet.it>.

Vadim Gritsenko wrote:

> > From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> >
> > Hi all,
> > I've a problem transforming big xml Files with Xalan or Saxon.
>
> How big are they?

they are dinamically generated (XSP pages) so have variable sizes but one of
the biggest is 7017 KB

>
>
> > I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> > So, using Xalan, C2 throws an exception (No more DTM available ....
> Known
> > problem of Xalan)
> > using Saxon C2 throws this strange exception:
> > Original exception : java.lang.ClassCastException:
> com.icl.saxon.Controller
> > at
> >
> org.apache.xalan.processor.TransformerFactoryImpl.newTransformerHandler(
> Transf
> > ormerFactoryImpl.java:670)
> >
>
> Does Saxon works for you on small files?

Yes, It work's fine (really faster than Xalan).

>
>
> Vadim
>
> > So, what can I do?
> > I've to give up to transform big xml files?
> > (Note that there are no problems transforming this files using Xalan
> or Saxon
> > but commandline!!)
> >
> > Bye & thanks
> >
> >     Alessandro
>
> ---------------------------------------------------------------------
> Please check that your question  has not already been answered in the
> FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>
>
> To unsubscribe, e-mail:     <co...@xml.apache.org>
> For additional commands, e-mail:   <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


RE: Transforming Big XML Files

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Alessandro Marcellini [mailto:amarcell@tiscalinet.it]
> 
> Hi all,
> I've a problem transforming big xml Files with Xalan or Saxon.

How big are they?


> I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
> So, using Xalan, C2 throws an exception (No more DTM available ....
Known
> problem of Xalan)
> using Saxon C2 throws this strange exception:
> Original exception : java.lang.ClassCastException:
com.icl.saxon.Controller
> at
>
org.apache.xalan.processor.TransformerFactoryImpl.newTransformerHandler(
Transf
> ormerFactoryImpl.java:670)
> 

Does Saxon works for you on small files?


Vadim


> So, what can I do?
> I've to give up to transform big xml files?
> (Note that there are no problems transforming this files using Xalan
or Saxon
> but commandline!!)
> 
> Bye & thanks
> 
>     Alessandro


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Transforming Big XML Files

Posted by Alessandro Marcellini <am...@tiscalinet.it>.
Hi all,
I've a problem transforming big xml Files with Xalan or Saxon.
I'm using Cocoon2.0.3 with tomcat3.3a on a Red Hat 7.2.
So, using Xalan, C2 throws an exception (No more DTM available .... Known
problem of Xalan)
using Saxon C2 throws this strange exception:
Original exception : java.lang.ClassCastException: com.icl.saxon.Controller
at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:670)

at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:282)

at
org.apache.cocoon.components.xslt.XSLTProcessorImpl.getTransformerHandler(XSLTProcessorImpl.java:239)

at
org.apache.cocoon.transformation.TraxTransformer.setup(TraxTransformer.java:298)

at
org.apache.cocoon.components.pipeline.AbstractEventPipeline.setupPipeline(AbstractEventPipeline.java:215)

at
org.apache.cocoon.components.pipeline.CachingEventPipeline.setup(CachingEventPipeline.java:278)

at
org.apache.cocoon.components.pipeline.CachingEventPipeline.generateKey(CachingEventPipeline.java:141)

at
org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:317)

at
org.apache.cocoon.www.pubit.sitemap_xmap.matchN4000ED(/opt/tomcat-3.3a/work/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/pubit/sitemap_xmap.java:1473)

at
org.apache.cocoon.www.pubit.sitemap_xmap.process(/opt/tomcat-3.3a/work/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/pubit/sitemap_xmap.java:512)

at
org.apache.cocoon.www.pubit.sitemap_xmap.process(/opt/tomcat-3.3a/work/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/pubit/sitemap_xmap.java:393)

at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at
org.apache.cocoon.www.sitemap_xmap.matchN4009B2(/opt/tomcat-3.3a/work/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:11783)

at
org.apache.cocoon.www.sitemap_xmap.process(/opt/tomcat-3.3a/work/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:3900)

at
org.apache.cocoon.www.sitemap_xmap.process(/opt/tomcat-3.3a/work/DEFAULT/cocoon/cocoon-files/org/apache/cocoon/www/sitemap_xmap.java:3148)

at org.apache.cocoon.sitemap.Handler.process(Handler.java:224)
at org.apache.cocoon.sitemap.Manager.invoke(Manager.java:179)
at org.apache.cocoon.sitemap.SitemapManager.process(SitemapManager.java:154)
at org.apache.cocoon.Cocoon.process(Cocoon.java:575)
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java)
at org.apache.tomcat.facade.ServletHandler.doService(Unknown Source)
at org.apache.tomcat.core.Handler.invoke(Unknown Source)
at org.apache.tomcat.core.Handler.service(Unknown Source)
at org.apache.tomcat.facade.ServletHandler.service(Unknown Source)
at org.apache.tomcat.core.ContextManager.internalService(Unknown Source)
at org.apache.tomcat.core.ContextManager.service(Unknown Source)
at org.apache.tomcat.modules.server.Ajp12Interceptor.processConnection(Unknown
Source)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(Unknown Source)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(Unknown
Source)
at java.lang.Thread.run(Thread.java:536)

So, what can I do?
I've to give up to transform big xml files?
(Note that there are no problems transforming this files using Xalan or Saxon
but commandline!!)

Bye & thanks

    Alessandro


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>


Solution: Lack of Memory

Posted by Alexander Schatten <al...@gmx.net>.
Thanks to a hint I received, I detected, that it was a memory problem.

If anybody should run into similar problems, add the following line to
tomcat, and restart tomcat:

set TOMCAT_OPTS=-Xms128M -Xmx256M


this increases the initial and the maximum java heap size to 128MB (256MB),
off course one can modify these settings.



Thanx


Alex


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Bug in Cocoon rendering bigger XML files to PDF??

Posted by Alexander Schatten <al...@gmx.net>.
no one has an idea about this serious bug?

Alexander Schatten wrote:

> I just wrote a xsl:fo to render a XML file to PDF.
>
> testing it with a smaller XML file works perfectly (result are about 30
> pages).
>
> Then I replaced the small test XML with the regular xml file (about
> 2MB), Cocoon starts rendering, shows up to nearly 300 pages, NO error,
> seems to finish, but then starts again from the beginning, from page
> 1... 300 again and again...
>
> this should be a bug, no?
>
> Alex
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: Bug in Cocoon rendering bigger XML files to PDF??

Posted by SoftLiban ITANI Mohamed <mo...@softsolutions.fr>.
Hi,

Were you able to solve ur problem??
I'm going through the same problem, no matter what is the size of my XML.
I'm using cocoon with tomcat, cocoon seems to transform my XML 3 times if
adobe acrobat reader is not loaded and 2 times if it is???
Any idea, would be very useful.
Thanks in advance.

Itani

Alexander Schatten wrote:

> I just wrote a xsl:fo to render a XML file to PDF.
>
> testing it with a smaller XML file works perfectly (result are about 30
> pages).
>
> Then I replaced the small test XML with the regular xml file (about
> 2MB), Cocoon starts rendering, shows up to nearly 300 pages, NO error,
> seems to finish, but then starts again from the beginning, from page
> 1... 300 again and again...
>
> this should be a bug, no?
>
> Alex
>
> ---------------------------------------------------------------------
> Please check that your question has not already been answered in the
> FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>
>
> To unsubscribe, e-mail: <co...@xml.apache.org>
> For additional commands, e-mail: <co...@xml.apache.org>


---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>