Exception while implementing find screen

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Exception while implementing find screen

Shereen
Hi all
I want to implement my new module in accounting and I want the home page as the default page:
1- create new
2- search fields
3- list of search results
 while doing the search parts I faced the following exception:
EntityListIterator Exception
 here's my list

<form name="LGList" type="list" list-name="LGList" paginate-target="FindLetterOfGuarantee" paginate="true" odd-row-style="alternate-row" default-table-style="basic-table hover-bar" header-row-style="header-row-2">
                <actions>
            <set field="entityName" value="LetterOfGuarantee"/>
            <service service-name="performFind" result-map="result" result-map-list="LGList">
                <field-map field-name="inputFields" from-field="parameters"/>
                <field-map field-name="entityName" from-field="entityName"/>
                <field-map field-name="orderBy" from-field="parameters.sortField"/>
                <field-map field-name="viewIndex" from-field="viewIndex"/>
                <field-map field-name="viewSize" from-field="viewSize"/>
            </service>
        </actions>
  <auto-fields-entity entity-name="LetterOfGuarantee" default-field-type="display"/>
       
  <field name="LGId" widget-style="buttontext">
       <hyperlink description="${LGId}" target="EditLetterOfGuarantee">
           <parameter param-name="LGId"/>
       </hyperlink>
        </field>
  <field name="Name"><display/></field>
 
        <field name="FromParty" title="${uiLabelMap.AccountingFromParty}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName},${lastName}">
                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="[${FromParty}]" >
                    <parameter param-name="partyId" from-field="FromParty"/>
                </sub-hyperlink>
            </display-entity>
        </field>
 
 
   <field name="ToParty" title="${uiLabelMap.AccountingFromParty}">
            <display-entity entity-name="PartyNameView" key-field-name="partyId" description="${groupName}${firstName},${lastName}">
                <sub-hyperlink target="/partymgr/control/viewprofile" target-type="inter-app" description="[${ToParty}]" >
                    <parameter param-name="partyId" from-field="ToParty"/>
                </sub-hyperlink>
            </display-entity>
        </field>
 
  <field name="updateLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
        <hyperlink target="EditLetterOfGuarantee" description="${uiLabelMap.CommonUpdate}" also-hidden="false">
                <parameter param-name="LGId"/>
        </hyperlink>
 </field>
  <field name="deleteLink" title="${uiLabelMap.CommonEmptyHeader}" widget-style="buttontext">
       <hyperlink target="RemoveLetterOfGuarantee" description="${uiLabelMap.CommonRemove}" also-hidden="false">
                <parameter param-name="LGId"/>
       </hyperlink>
  </field>
</form>

 here's my find form

<form name="FindLettersOfGuarantee" type="single" target="FindLetterOfGuarantee"
        header-row-style="header-row" default-table-style="basic-table">
        <field name="noConditionFind"><hidden value="Y"/></field>
        <field name="LGId"><text-find ignore-case="true"/></field>
        <field name="LGStatusId" title="${uiLabelMap.CommonStatus}">
            <drop-down allow-empty="true" current="selected">
                <entity-options description="${LGStatusId}" entity-name="LGStatus">
                    <entity-order-by field-name="LGStatusId"/>
                </entity-options>
            </drop-down>
        </field>
        <field position="1" name="partyIdFrom"><lookup target-form-name="LookupPartyName"/></field>
        <field position="2" name="partyIdTo"><lookup target-form-name="LookupPartyName"/></field>
        <field position="1" name="amount"><text/></field>
        <field name="searchButton" title="${uiLabelMap.CommonFind}" widget-style="smallSubmit"><submit button-type="button"/></field>
    </form>
this is the screen
<screen name="FindLetterOfGuarantee">
        <section>
            <actions>
                <set field="titleProperty" value="LetterOffGuarantee"/>
            </actions>
            <widgets>
                <decorator-screen name="main-decorator" location="${parameters.mainDecoratorLocation}">
                    <decorator-section name="body">
                        <section>
                            <condition>
                                 <if-service-permission service-name="acctgAgreementPermissionCheck" main-action="VIEW"/>
                            </condition>
                            <widgets>
                                <decorator-screen name="FindScreenDecorator" location="component://common/widget/CommonScreens.xml">
                                    <decorator-section name="menu-bar">
                                        <container style="button-bar">
                <link target="EditLetterOfGuarantee" text="New Letter Of Guarantee" style="buttontext create"/>
          </container>
                                    </decorator-section>
                                    <decorator-section name="search-options">
                                        <include-form name="FindLettersOfGuarantee" location="component://accounting/widget/LetterOfGuaranteeForms.xml"/>
                                    </decorator-section>
                                    <decorator-section name="search-results">
                                        <include-form name="LGList" location="component://accounting/widget/LetterOfGuaranteeForms.xml"/>
                                    </decorator-section>
                                </decorator-screen>
                            </widgets>
                            <fail-widgets>
                                <label style="h3">${uiLabelMap.AccountingViewPermissionError}</label>
                            </fail-widgets>
                        </section>
                    </decorator-section>
                </decorator-screen>
            </widgets>
         </section>
    </screen>
controller
    <view-map name="FindLetterOfGuarantee" type="screen" page="component://accounting/widget/LetterOfGuaranteeScreens.xml#FindLetterOfGuarantee"/>
<request-map uri="FindLetterOfGuarantee">
        <security https="true" auth="true"/>
        <response name="success" type="view" value="FindLetterOfGuarantee"/>
        </request-map>
       
I want to just look like the agreement main screen
Reply | Threaded
Open this post in threaded view
|

Re: Exception while implementing find screen

Shereen
this is the stack trace if anyone can help
Error closing the result, connection, etc in finalize SQLProcessor
Exception: java.lang.NullPointerException
Message: null
---- stack trace ---------------------------------------------------------------
java.lang.NullPointerException
org.apache.commons.dbcp.managed.ManagedConnection.close(ManagedConnection.java:147)
org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:224)
org.ofbiz.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:820)
java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
java.lang.ref.Finalizer.access$100(Finalizer.java:14)
java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
--------------------------------------------------------------------------------

2010-10-12 16:01:06,116 (Finalizer) [ EntityListIterator.java:543:ERROR]
====================================================================
 EntityListIterator Not Closed for Entity [LetterOfGuarantee], caught in Finalize
 ====================================================================
Reply | Threaded
Open this post in threaded view
|

Re: Exception while implementing find screen

Shereen
In reply to this post by Shereen
I'm thankful for any one who tried to help I figured out just by chance that I must name my list ListIT that's why the list iterator was not working
Reply | Threaded
Open this post in threaded view
|

Re: Exception while implementing find screen

Jacques Le Roux
Administrator
In reply to this post by Shereen
You must close the EntityListIterator and enclose its use in a Transaction.

Have a look at PosTransaction.searchClientProfile
Jacques

From: "Shereen" <[hidden email]>

> this is the stack trace if anyone can help
> Error closing the result, connection, etc in finalize SQLProcessor
> Exception: java.lang.NullPointerException
> Message: null
> ---- stack trace
> ---------------------------------------------------------------
> java.lang.NullPointerException
> org.apache.commons.dbcp.managed.ManagedConnection.close(ManagedConnection.java:147)
> org.ofbiz.entity.jdbc.SQLProcessor.close(SQLProcessor.java:224)
> org.ofbiz.entity.jdbc.SQLProcessor.finalize(SQLProcessor.java:820)
> java.lang.ref.Finalizer.invokeFinalizeMethod(Native Method)
> java.lang.ref.Finalizer.runFinalizer(Finalizer.java:83)
> java.lang.ref.Finalizer.access$100(Finalizer.java:14)
> java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:160)
> --------------------------------------------------------------------------------
>
> 2010-10-12 16:01:06,116 (Finalizer) [ EntityListIterator.java:543:ERROR]
> ====================================================================
> EntityListIterator Not Closed for Entity [LetterOfGuarantee], caught in
> Finalize
> ====================================================================
>
> --
> View this message in context: http://ofbiz.135035.n4.nabble.com/Exception-while-implementing-find-screen-tp2991964p2991985.html
> Sent from the OFBiz - User mailing list archive at Nabble.com.
>

Reply | Threaded
Open this post in threaded view
|

Re: Exception while implementing find screen

BJ Freeman
In reply to this post by Shereen
documenting this in FAQ might be good Idea.

Shereen sent the following on 10/12/2010 7:26 AM:
>
> I'm thankful for any one who tried to help I figured out just by chance that
> I must name my list ListIT that's why the list iterator was not working