Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

XPages File Download Control: NotesException "Object has been removed or recycled"

I have troubles with the XPages xp:fileDownload core control, running on a Domino 9.0.1 FP3 server. On a Domino 8.5.3 FP6 server I have no problems, it works perfect!


Here's the simple source code of the xpage:


<?xml version="1.0" encoding="UTF-8"?>
<xp:view xmlns:xp="http://www.ibm.com/xsp/core">

    <xp:this.data>
        <xp:dominoDocument var="document1" computeWithForm="onsave" 
            formName="Files" action="editDocument"
            documentId="6E004D63CD737B79C1257E520050C14C">
        </xp:dominoDocument>
    </xp:this.data>

    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:fileUpload id="fileUpload1" value="#{document1.Body}"></xp:fileUpload>

    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:fileDownload rows="30" id="fileDownload1" displayLastModified="false" 
        value="#{document1.Body}" allowDelete="true">
    </xp:fileDownload>

    <xp:br></xp:br>
    <xp:br></xp:br>
    <xp:button value="Save" id="button1">
        <xp:eventHandler event="onclick" submit="true" refreshMode="complete">
            <xp:this.action>
                <xp:saveDocument var="document1"></xp:saveDocument>
            </xp:this.action>
        </xp:eventHandler>
    </xp:button>
</xp:view>


Take a look at the following scenario:


  1. Upload some files (using xp:fileUpload core control)

enter image description here

  1. Delete a file and save the document (repeat this step)

enter image description here

  1. After some repeats, I get the following notes exception

enter image description here

Remember: I have no troubles on Domino Server 8.5.3 FP6!

like image 664
Georg Kastenhofer Avatar asked Nov 20 '25 22:11

Georg Kastenhofer


1 Answers

This may be caused by XPage persistence settings. The component tree is stored in memory / on disk and there are a maximum number of entries, set in XSP Properties. The amount of uploads / deletes may be meaning the original component tree is no longer available.

Check the persistence settings in the application / server. If this is the cause it will consistently fail after x refreshes on the same page.

One option is increasing. Alternatively, in 9.0.1 the file upload can be changed to run via a partial refresh, which may also resolve the problem.

like image 57
Paul Stephen Withers Avatar answered Nov 22 '25 11:11

Paul Stephen Withers



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!