Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020858Openbravo ERPZ. Otherspublic2012-06-25 17:162012-06-30 05:10
maite 
ioritzCia 
immediatemajoralways
closedfixed 
5
 
3.0MP133.0MP13 
Core
No
0020858: Error "maximum number of expressions in a list is 1000" in getFilteredPaymentMethods method
Problem is raised in Oracle environment when pressing "Add Payment In/Out" button in Invoice window and there are more than 1000 payment methods associated to that Financial Account
1. Create 1001 payment methods and associate it to same Financial Account
2. Set this Financial Account to any business partner
3. Create Sales Invoice for that business partner and press "Add Payment In/Out" button. Error will be obtained

17ed39e2 11:48:05 [http-8080-8] ERROR org.openbravo.advpaymentmngt.ad_actionbutton.AddPaymentFromInvoice - Error captured:
org.hibernate.exception.SQLGrammarException: could not execute query
    at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:92)
    at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:66)
    at org.hibernate.loader.Loader.doList(Loader.java:2536)
    at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2276)
    at org.hibernate.loader.Loader.list(Loader.java:2271)
    at org.hibernate.loader.criteria.CriteriaLoader.list(CriteriaLoader.java:119)
    at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1716)
    at org.hibernate.impl.CriteriaImpl.list(CriteriaImpl.java:347)
    at org.openbravo.dal.service.OBCriteria.list(OBCriteria.java:89)
    at org.openbravo.advpaymentmngt.dao.AdvPaymentMngtDao.getFilteredPaymentMethods(AdvPaymentMngtDao.java:1075)
    at org.openbravo.advpaymentmngt.utility.FIN_Utility.getPaymentMethodList(FIN_Utility.java:451)
    at org.openbravo.advpaymentmngt.ad_actionbutton.AddPaymentFromInvoice.printPage(AddPaymentFromInvoice.java:336)
    at org.openbravo.advpaymentmngt.ad_actionbutton.AddPaymentFromInvoice.doPost(AddPaymentFromInvoice.java:90)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:225)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:422)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.client.kernel.KernelFilter$1.doAction(KernelFilter.java:62)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.client.kernel.KernelFilter.doFilter(KernelFilter.java:71)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.openbravo.dal.core.DalRequestFilter$1.doAction(DalRequestFilter.java:81)
    at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46)
    at org.openbravo.dal.core.DalRequestFilter.doFilter(DalRequestFilter.java:103)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:619)
Caused by: java.sql.SQLSyntaxErrorException: ORA-01795: maximum number of expressions in a list is 1000

    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
    at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
    at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
    at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
    at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
    at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
    at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
    at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
    at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
    at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
    at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
    at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
    at org.hibernate.jdbc.AbstractBatcher.getResultSet(AbstractBatcher.java:208)
    at org.hibernate.loader.Loader.getResultSet(Loader.java:1953)
    at org.hibernate.loader.Loader.doQuery(Loader.java:802)
    at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:274)
    at org.hibernate.loader.Loader.doList(Loader.java:2533)
    ... 42 more
Problem is similar to related bug 16001, so similar solution could be used
No tags attached.
related to defect 0016001 closed eduardo_Argal Modules error in add payment process when there are more than 1000 financial accounts 
related to defect 00209053.0MP13 closed ioritzCia Openbravo ERP change in 20858 uses rong limit probably causing bad performance and causes compile time warnings 
Issue History
2012-06-25 17:16maiteNew Issue
2012-06-25 17:16maiteAssigned To => mirurita
2012-06-25 17:16maiteModules => Core
2012-06-25 17:16maiteRelationship addedrelated to 0016001
2012-06-25 17:17maiteSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3568#r3568
2012-06-25 17:17maiteIssue Monitored: networkb
2012-06-25 19:01maiteAssigned Tomirurita => ioritzCia
2012-06-25 19:01maitePriorityurgent => immediate
2012-06-25 19:01maiteTarget Version => 3.0MP13
2012-06-28 13:51ioritzCiaStatusnew => scheduled
2012-06-28 13:51ioritzCiafix_in_branch => pi
2012-06-29 09:23hgbotCheckin
2012-06-29 09:23hgbotNote Added: 0050268
2012-06-29 09:23hgbotStatusscheduled => resolved
2012-06-29 09:23hgbotResolutionopen => fixed
2012-06-29 09:23hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/b7866285b3e41485cdb3e68027329ef97c88bf40 [^]
2012-06-29 10:02jonalegriaesarteNote Added: 0050270
2012-06-29 10:02jonalegriaesarteStatusresolved => closed
2012-06-29 10:02jonalegriaesarteFixed in Version => 3.0MP13
2012-06-30 05:10hudsonbotCheckin
2012-06-30 05:10hudsonbotNote Added: 0050298
2012-07-02 12:12shuehnerRelationship addedrelated to 0020905

Notes
(0050268)
hgbot   
2012-06-29 09:23   
Repository: erp/devel/pi
Changeset: b7866285b3e41485cdb3e68027329ef97c88bf40
Author: Ioritz Cia <ioritz.cia <at> openbravo.com>
Date: Thu Jun 28 16:54:34 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/b7866285b3e41485cdb3e68027329ef97c88bf40 [^]

Fixes issue 20858: getFilteredPaymentMethods method fails in oracle.
It can add more than 1000 elements to an in clause.

---
M modules/org.openbravo.advpaymentmngt/src/org/openbravo/advpaymentmngt/dao/AdvPaymentMngtDao.java
---
(0050270)
jonalegriaesarte   
2012-06-29 10:02   
Verfied in customer installation.
(0050298)
hudsonbot   
2012-06-30 05:10   
A changeset related to this issue has been promoted main and to the
Central Repository, after passing a series of tests.

Promotion changeset: https://code.openbravo.com/erp/devel/main/rev/ce760b148e29 [^]

Maturity status: Test