You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Marc Salvetti <ma...@notremanou.net> on 2005/01/26 10:00:07 UTC

Flushing pb in flowscript

Hello,

I have a function in flowscript that do something like this :


    var document = loadDocument(documentURI);
    form.load(document);
    form.showForm(displayPipeline);
    form.save(document);
    var invoicesDocURI = "xdocs/invoices/invoices_4.xml";
    var invoicesDoc = loadDocument(invoicesDocURI);
    saveDocument(invoicesDoc, invoicesDocURI);
    saveDocument(document, documentURI);
    cocoon.sendPage(successPipeline);


The pb is that the second time the function is called after the server 
is started, the doc invoicesDoc is not saved, due to a flushing pb.

here is the error from the log
ERROR   (2005-01-26) 15:47.41:206   [flow] (/cfm/cruise.continue) 
http-8080-Processor24/FOM_Cocoon.FOM_Log: Could not flush/close 
outputstream: java.io.IOException: Could not rename C:\Program 
Files\Apache Software Foundation\Tomcat 
5.0\webapps\cfm\cfm\xdocs\invoices\invoices_4.xml.tmp to C:\Program 
Files\Apache Software Foundation\Tomcat 
5.0\webapps\cfm\cfm\xdocs\invoices\invoices_4.xml

Somehow, by commenting/uncommenting the code until it works, i managed 
to understand that the call to form.load() is responsible, and that a 
call to form.save() allow you not to reboot completely to be able to 
save the file again !

If someone have an idea of a workaround ?

thanks,

Marc

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: Flushing pb in flowscript

Posted by Marc Salvetti <ma...@notremanou.net>.
After hours of random debugging, i figured that without the underscore 
in the filename (ie : xdocs/invoices/invoices_4.xml to 
xdocs/invoices/invoices4.xml ) the problem suddenly disapeared !!!
Maybe a bug in CForms ?
Hope this will help

Cheers,

Marc

Marc Salvetti a écrit :

> Hello,
>
> I have a function in flowscript that do something like this :
>
>
>    var document = loadDocument(documentURI);
>    form.load(document);
>    form.showForm(displayPipeline);
>    form.save(document);
>    var invoicesDocURI = "xdocs/invoices/invoices_4.xml";
>    var invoicesDoc = loadDocument(invoicesDocURI);
>    saveDocument(invoicesDoc, invoicesDocURI);
>    saveDocument(document, documentURI);
>    cocoon.sendPage(successPipeline);
>
>
> The pb is that the second time the function is called after the server 
> is started, the doc invoicesDoc is not saved, due to a flushing pb.
>
> here is the error from the log
> ERROR   (2005-01-26) 15:47.41:206   [flow] (/cfm/cruise.continue) 
> http-8080-Processor24/FOM_Cocoon.FOM_Log: Could not flush/close 
> outputstream: java.io.IOException: Could not rename C:\Program 
> Files\Apache Software Foundation\Tomcat 
> 5.0\webapps\cfm\cfm\xdocs\invoices\invoices_4.xml.tmp to C:\Program 
> Files\Apache Software Foundation\Tomcat 
> 5.0\webapps\cfm\cfm\xdocs\invoices\invoices_4.xml
>
> Somehow, by commenting/uncommenting the code until it works, i managed 
> to understand that the call to form.load() is responsible, and that a 
> call to form.save() allow you not to reboot completely to be able to 
> save the file again !
>
> If someone have an idea of a workaround ?
>
> thanks,
>
> Marc
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org