cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robby Pelssers <Robby.Pelss...@nxp.com>
Subject RE: [jira] [Created] (COCOON-2317) Publish XML Documents in PDF PROBLEM
Date Thu, 29 Sep 2011 12:18:19 GMT
Sorry,

On second thought this was not due to the memory leak.  I remember that I was facing the same
caching issue as you resulting in nullpointers and unpredictable behaviour .. heck... even
wrong files got served so I fixed it perhaps less elegant by switching to noncaching in my
sitemap.

    <map:components>
      <map:pipes default="noncaching">
        <map:pipe name="caching" src="org.apache.cocoon.components.pipeline.impl.CachingProcessingPipeline"/>
        <map:pipe name="noncaching" src="org.apache.cocoon.components.pipeline.impl.NonCachingProcessingPipeline"/>
      </map:pipes>
      ...
    </map:components>

It might not be the optimal solution but performance was not really worse in my opinion as
far as I can tell.

Robby

-----Original Message-----
From: Robby Pelssers [mailto:Robby.Pelssers@nxp.com]
Sent: Thursday, September 29, 2011 1:51 PM
To: dev@cocoon.apache.org
Subject: RE: [jira] [Created] (COCOON-2317) Publish XML Documents in PDF PROBLEM

I had a similar issue and I think the memory leak was also responsible for this behaviour.
http://old.nabble.com/memory-leak-in-PoolableProxyHandler-td29023190.html

Try to check if this leak applies to you as well and fix it... If the issue still persists..
let me know.

Robby Pelssers

-----Original Message-----
From: denis13 (Created) (JIRA) [mailto:jira@apache.org]
Sent: Thursday, September 29, 2011 12:57 PM
To: dev@cocoon.apache.org
Subject: [jira] [Created] (COCOON-2317) Publish XML Documents in PDF PROBLEM

Publish XML Documents in PDF PROBLEM
------------------------------------

                 Key: COCOON-2317
                 URL: https://issues.apache.org/jira/browse/COCOON-2317
             Project: Cocoon
          Issue Type: Bug
          Components: * Cocoon Core
            Reporter: denis13


I need help because i don't have any information for my error.

You can see it in french at : http://www.developpez.net/forums/d1136142/webmasters-developpement-web/serveurs-apache-iis/apache/exception-sous-apache-cocoon/#post6267530

I wan't to generate pdf from xml. My problem is that sometime it works, sometime it don't
works and i have this errors :

- handled-error.log :
ERROR   (2011-09-28) 11:23.00:237   [sitemap.handled-errors] (/cocoon/ImpressionPdf/D:/DOSSIER_TEMP/MONDOC_20110826.pdf)
http-8080-4/PipelineNode:
java.lang.NullPointerException
         at org.apache.excalibur.store.impl.AbstractJispFilesystemStore.doGetSize(AbstractJispFilesystemStore.java:330)
         at org.apache.excalibur.store.impl.AbstractReadWriteStore.remove(AbstractReadWriteStore.java:226)
         at org.apache.excalibur.store.impl.MRUMemoryStore.remove(MRUMemoryStore.java:327)
         at org.apache.cocoon.caching.impl.CacheImpl.remove(CacheImpl.java:150)
         at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.validatePipeline(AbstractCachingProcessingPipeline.java:599)
         at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.setupPipeline(AbstractCachingProcessingPipeline.java:659)
         at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.preparePipeline(AbstractProcessingPipeline.java:541)
         at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:499)
         at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:155)
         at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
         at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
         at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
         at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
         at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
         at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
         at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
         at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
         at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
         at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
         at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:165)
         at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
         at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:162)
         at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:107)
         at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:136)
         at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:371)
         at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:312)
         at org.apache.cocoon.Cocoon.process(Cocoon.java:656)
         at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1112)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
         at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:843)
         at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:640)
         at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1293)
         at java.lang.Thread.run(Unknown Source)


- sitemap.log
INFO    (2011-09-28) 11:23.00:237   [sitemap] (/cocoon/ImpressionLiasse/D:/DOSSIER_TEMP/MONDOC_20110826.pdf)
http-8080-4/HandleErrorsNode: Processing handle-errors at file:/D:/PROJETS/DEVELOPPEMENT/WORKSPACE/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/webapps/cocoon/sitemap.xmap:755:24


- ImpressionLiasse/sitemap.xmap
<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
         <!-- =========================== Components ================================ -->
         <map:components>
                  <map:matchers default="wildcard"/>
                  <map:selectors default="browser"/>
                  <!--=================Ajout pour sauver le fichier pdf sur le disque INUTILE
avec copy-source=======================-->
                  <map:actions>
                  <map:action logger="sitemap.action.copy-source" name="copy-source" src="org.apache.cocoon.acting.CopySourceAction"/>
                  </map:actions>
                  <!--=================Fin Ajout pour sauver le fichier pdf sur le disque
=======================-->
                  <map:generators default="file"/>
                  <map:transformers default="xslt"/>
                  <map:readers default="resource"/>
                  <map:serializers default="html">
                           <map:serializer name="vrml" mime-type="model/vrml" logger="sitemap.serializer.vrml"
src="org.apache.cocoon.serialization.TextSerializer"/>
                           <map:serializer name="wml" mime-type="text/vnd.wap.wml" logger="sitemap.serializer.wml"
src="org.apache.cocoon.serialization.XMLSerializer">
                                    <doctype-public>-//WAPFORUM//DTD WML 1.1//EN</doctype-public>
                                    <doctype-system>http://www.wapforum.org/DTD/wml_1.1.xml</doctype-system>
                                    <encoding>ASCII</encoding>
                                    <omit-xml-declaration>yes</omit-xml-declaration>
                           </map:serializer>
                           <map:serializer name="svgxml" mime-type="image/svg-xml" logger="sitemap.serializer.svgxml"
src="org.apache.cocoon.serialization.XMLSerializer">
                                    <doctype-public>-//W3C//DTD SVG 20000303 Stylable//EN</doctype-public>
                                    <doctype-system>http://www.w3.org/TR/2000/03/WD-SVG-20000303/</doctype-system>
                           </map:serializer>
                           <map:serializer name="xhtml" mime-type="text/html" logger="sitemap.serializer.xhtml"
src="org.apache.cocoon.serialization.XMLSerializer" pool-max="64" pool-min="2" pool-grow="2">
                                    <doctype-public>-//W3C//DTD XHTML 1.0 Strict//EN</doctype-public>
                                    <doctype-system>http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd</doctype-system>
                                    <encoding>UTF-8</encoding>
                           </map:serializer>
                           <map:serializer name="text" mime-type="text/plain" logger="sitemap.serializer.text"
src="org.apache.cocoon.serialization.TextSerializer"/>
                           <map:serializer name="svg2jpeg" logger="sitemap.serializer.svg2jpeg"
src="org.apache.cocoon.serialization.SVGSerializer" mime-type="image/jpeg"/>
                           <map:serializer name="fo2pdf" logger="sitemap.serializer.fo2pdf"
src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/pdf">
                                    <!-- Ajout pour conf FOP-->
                                    <user-config>../WEB-INF/fop-config.xml</user-config>
                           </map:serializer>
                           <map:serializer name="fo2ps" logger="sitemap.serializer.fo2ps"
src="org.apache.cocoon.serialization.FOPSerializer" mime-type="application/postscript"/>
                           <map:serializer name="xls" logger="sitemap.serializer.xls" src="org.apache.cocoon.serialization.HSSFSerializer"
mime-type="application/vnd.ms-excel"/>
                  </map:serializers>
         </map:components>
         <!-- =========================== Views =================================== -->
         <!-- Views provide diffent, well, views to resources. Views are orthogonal to
pipelines. Please refer to the docs. -->
         <map:views>
                  <map:view name="content" from-label="content">
                           <map:serialize type="xml"/>
                  </map:view>
                  <map:view name="pretty-content" from-label="data">
                           <map:transform src="stylesheets/simple-xml2html.xsl"/>
                           <map:serialize type="html"/>
                  </map:view>
                  <map:view name="links" from-position="last">
                           <map:serialize type="links"/>
                  </map:view>
         </map:views>
<!--=================Ajout pour sauver le fichier pdf sur le disque  INUTILE avec copy-source=======================-->
<map:flow language="javascript">
  <map:script src="pdf.flow"/>
</map:flow>
<!--=================Fin Ajout pour sauver le fichier pdf sur le disque ==========================================-->
         <map:pipelines>
                  <!-- Utility for viewing source xml or html -->
                  <map:pipeline>
                           <map:match pattern="**.source">
                                    <map:generate src="cocoon:/{1}"/>
                                    <map:transform src="style/xsl/simple-xml2html.xsl"/>
                                    <map:serialize/>
                           </map:match>
                  </map:pipeline>
                  <map:pipeline>
                           <map:match pattern="**favicon.ico">
                                    <map:read mime-type="application/ico" src="resources/icons/cocoon.ico"/>
                           </map:match>
                           <map:match pattern="*.gif">
                                    <map:read mime-type="image/gif" src="{1}.gif"/>
                           </map:match>
                           <map:match pattern="images/**.jpg">
                                    <map:read mime-type="image/jpg" src="resources/images/{1}.jpg"/>
                           </map:match>
                  </map:pipeline>
                  <!--==================Ajout pipeline pour transformation =============================================-->
                  <!--======Pour les impressions quelque soit le type (nombre d'arguments
variables) ===================================-->
                  <map:pipeline>
                           <map:match pattern="**.pdf">
                                    <map:generate src="{1}.xml"/>
                                    <map:transform src="principal.xsl"/>
                                    <map:serialize type="fo2pdf"/>
                           </map:match>


                           <!--<map:match pattern="**.pdf">
                           <map:redirect-to uri=""/>
                           </map:match>-->

                  <map:match pattern="**.do">
                    <map:call function="makepdf">
                           <map:parameter name="folder1" value="{1}"/>
                   </map:call>
                  </map:match>

                           <map:match pattern="**.xml">
                           <map:act  type="copy-source"  src="cocoon:/production/{1}.pdf">
                           <map:parameter name="dest" value="{1}.pdf"/>
                           </map:act>
                           <map:generate type="jx" src="success.jx">
                             <map:parameter name="filename" value="{1}"/>
                           </map:generate>
                           <map:serialize type="html"/>

                           </map:match>

                           <map:match pattern="*.txt">
                           <map:redirect-to uri=""/>
                           <!--<map:read src="{1}.txt"/>-->
                           </map:match>

                           <map:match pattern="**/generate-all.html">
                           <!-- liste de tous les fichiers xml -->
                           <map:generate type="directory" src="{1}">
                           <!--<map:parameter name="sort" value="name"/>-->
                           </map:generate>
                           <!-- on transforme en une série de <xi:include
                  href="cocoon://copy-pdf-xxx.html"/> -->
                           <map:transform src="dir2include.xsl">
                           <map:parameter name="folder1" value="{1}"/>
                           </map:transform>
                           <!-- on réalise l'inclusion qui par effet de bord va copier
les
                  fichiers sur disque -->
                           <map:transform type="xinclude"/>
                           <!-- et on présente joliement la liste des fichiers qui ont
été
                  générés -->
                           <!--<map:transform src="result2html.xsl"/>-->
                           <!-- terminé! -->
                           <map:serialize type="html"/>
                           </map:match>

                           <map:match pattern="">
      <map:generate src="vide.xml"/>
      <map:transform src="vide.xslt">
        <map:parameter name="contextPath" value="{request:contextPath}"/>
      </map:transform>
      <map:serialize type="xhtml"/>
    </map:match>
             </map:pipeline>
         </map:pipelines>
</map:sitemap>
<!-- end of file -->

Does sommeone have an idea for this problem ?

Generaly it arrive when i wan't to see the same xml an other time...

Thanks in advance,

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Mime
View raw message