You'll need to be careful with this one, based on the limited usage of the
iterator here it seems likely that it will be used again later in the process. Regards Scott On Mon, 8 Apr 2019 at 07:38, <[hidden email]> wrote: > Author: mthl > Date: Sun Apr 7 19:38:09 2019 > New Revision: 1857084 > > URL: http://svn.apache.org/viewvc?rev=1857084&view=rev > Log: > Fixed: Use try with resource for closing ‘EntityListIterator’ > > Modified: > > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > > Modified: > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > URL: > http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1857084&r1=1857083&r2=1857084&view=diff > > ============================================================================== > --- > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > (original) > +++ > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > Sun Apr 7 19:38:09 2019 > @@ -1215,8 +1215,7 @@ public class FormRenderer { > } > int itemIndex = -1; > if (iter instanceof EntityListIterator) { > - EntityListIterator eli = (EntityListIterator) iter; > - try { > + try (EntityListIterator eli = (EntityListIterator) iter) { > if(eli.getResultsSizeAfterPartialList() > 0){ > itemIndex++; > } > > > |
Getting the following exception on FindGeneric screen, It seems its due to
above change. Let me check.. ERROR MESSAGE java.lang.IllegalArgumentException: Error running script at location [component://webtools/groovyScripts/entity/FindGeneric.groovy]: org.apache.ofbiz.base.util.GeneralRuntimeException: Error getting the next result (ResultSet not open. Operation 'next' not permitted. Verify that autocommit is off.) Kind Regards, Deepak Dixit On Mon, Apr 8, 2019 at 5:44 AM Scott Gray <[hidden email]> wrote: > You'll need to be careful with this one, based on the limited usage of the > iterator here it seems likely that it will be used again later in the > process. > > Regards > Scott > > On Mon, 8 Apr 2019 at 07:38, <[hidden email]> wrote: > > > Author: mthl > > Date: Sun Apr 7 19:38:09 2019 > > New Revision: 1857084 > > > > URL: http://svn.apache.org/viewvc?rev=1857084&view=rev > > Log: > > Fixed: Use try with resource for closing ‘EntityListIterator’ > > > > Modified: > > > > > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > > > > Modified: > > > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > > URL: > > > http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1857084&r1=1857083&r2=1857084&view=diff > > > > > ============================================================================== > > --- > > > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > > (original) > > +++ > > > ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java > > Sun Apr 7 19:38:09 2019 > > @@ -1215,8 +1215,7 @@ public class FormRenderer { > > } > > int itemIndex = -1; > > if (iter instanceof EntityListIterator) { > > - EntityListIterator eli = (EntityListIterator) iter; > > - try { > > + try (EntityListIterator eli = (EntityListIterator) iter) { > > if(eli.getResultsSizeAfterPartialList() > 0){ > > itemIndex++; > > } > > > > > > > |
This has been reverted at r1857095
Kind Regards, Deepak Dixit On Mon, Apr 8, 2019 at 10:48 AM Deepak Dixit <[hidden email]> wrote: > Getting the following exception on FindGeneric screen, It seems its due to > above change. Let me check.. > > ERROR MESSAGE > > java.lang.IllegalArgumentException: Error running script at location > [component://webtools/groovyScripts/entity/FindGeneric.groovy]: > org.apache.ofbiz.base.util.GeneralRuntimeException: Error getting the next > result (ResultSet not open. Operation 'next' not permitted. Verify that > autocommit is off.) > Kind Regards, > Deepak Dixit > > > On Mon, Apr 8, 2019 at 5:44 AM Scott Gray <[hidden email]> > wrote: > >> You'll need to be careful with this one, based on the limited usage of the >> iterator here it seems likely that it will be used again later in the >> process. >> >> Regards >> Scott >> >> On Mon, 8 Apr 2019 at 07:38, <[hidden email]> wrote: >> >> > Author: mthl >> > Date: Sun Apr 7 19:38:09 2019 >> > New Revision: 1857084 >> > >> > URL: http://svn.apache.org/viewvc?rev=1857084&view=rev >> > Log: >> > Fixed: Use try with resource for closing ‘EntityListIterator’ >> > >> > Modified: >> > >> > >> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >> > >> > Modified: >> > >> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >> > URL: >> > >> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1857084&r1=1857083&r2=1857084&view=diff >> > >> > >> ============================================================================== >> > --- >> > >> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >> > (original) >> > +++ >> > >> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >> > Sun Apr 7 19:38:09 2019 >> > @@ -1215,8 +1215,7 @@ public class FormRenderer { >> > } >> > int itemIndex = -1; >> > if (iter instanceof EntityListIterator) { >> > - EntityListIterator eli = (EntityListIterator) iter; >> > - try { >> > + try (EntityListIterator eli = (EntityListIterator) iter) { >> > if(eli.getResultsSizeAfterPartialList() > 0){ >> > itemIndex++; >> > } >> > >> > >> > >> > |
Thanks for taking care of this.
Deepak Dixit <[hidden email]> writes: > This has been reverted at r1857095 > > Kind Regards, > Deepak Dixit > > > On Mon, Apr 8, 2019 at 10:48 AM Deepak Dixit <[hidden email]> wrote: > >> Getting the following exception on FindGeneric screen, It seems its due to >> above change. Let me check.. >> >> ERROR MESSAGE >> >> java.lang.IllegalArgumentException: Error running script at location >> [component://webtools/groovyScripts/entity/FindGeneric.groovy]: >> org.apache.ofbiz.base.util.GeneralRuntimeException: Error getting the next >> result (ResultSet not open. Operation 'next' not permitted. Verify that >> autocommit is off.) >> Kind Regards, >> Deepak Dixit >> >> >> On Mon, Apr 8, 2019 at 5:44 AM Scott Gray <[hidden email]> >> wrote: >> >>> You'll need to be careful with this one, based on the limited usage of the >>> iterator here it seems likely that it will be used again later in the >>> process. >>> >>> Regards >>> Scott >>> >>> On Mon, 8 Apr 2019 at 07:38, <[hidden email]> wrote: >>> >>> > Author: mthl >>> > Date: Sun Apr 7 19:38:09 2019 >>> > New Revision: 1857084 >>> > >>> > URL: http://svn.apache.org/viewvc?rev=1857084&view=rev >>> > Log: >>> > Fixed: Use try with resource for closing ‘EntityListIterator’ >>> > >>> > Modified: >>> > >>> > >>> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >>> > >>> > Modified: >>> > >>> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >>> > URL: >>> > >>> http://svn.apache.org/viewvc/ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java?rev=1857084&r1=1857083&r2=1857084&view=diff >>> > >>> > >>> ============================================================================== >>> > --- >>> > >>> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >>> > (original) >>> > +++ >>> > >>> ofbiz/ofbiz-framework/trunk/framework/widget/src/main/java/org/apache/ofbiz/widget/renderer/FormRenderer.java >>> > Sun Apr 7 19:38:09 2019 >>> > @@ -1215,8 +1215,7 @@ public class FormRenderer { >>> > } >>> > int itemIndex = -1; >>> > if (iter instanceof EntityListIterator) { >>> > - EntityListIterator eli = (EntityListIterator) iter; >>> > - try { >>> > + try (EntityListIterator eli = (EntityListIterator) iter) { >>> > if(eli.getResultsSizeAfterPartialList() > 0){ >>> > itemIndex++; >>> > } >>> > >>> > >>> > >>> >> -- Mathieu Lirzin GPG: F2A3 8D7E EB2B 6640 5761 070D 0ADE E100 9460 4D37 |
Free forum by Nabble | Edit this page |