Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0036115 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | major | always | 2017-05-26 10:48 | 2017-06-23 13:53 | |||
Reporter | eduardo_Argal | View Status | public | |||||
Assigned To | caristu | |||||||
Priority | urgent | Resolution | fixed | Fixed in Version | 3.0PR17Q3 | |||
Status | closed | Fix in branch | Fixed in SCM revision | 12dac8fcf979 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Merge Request Status | ||||||||
Review Assigned To | inigosanchez | |||||||
OBNetwork customer | OBPS | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Support ticket | ||||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0036115: A request is being sent when adding a widget even if parameters have not yet been set | |||||||
Description | A request to the datasource is being sent when adding a widget even if parameters have not yet been set. This ends up in an error in log when it should not. | |||||||
Steps To Reproduce | Install this widgets module: https://bitbucket.org/gpscode/but_com.openbravo.retail.reports-customwidgets [^] Add Total Store Sales widget to the workspace Parameter window should be displayed for the widget as there are a couple of date mandatory parameters which needs to be set before running the widget. Mind that an error appears in the log: 148304779 [http-bio-8080-exec-9] ERROR org.openbravo.service.datasource.DataSourceServlet - Not all named parameters have been set: [dateTo, dateFrom] [select o.name as organizationName, so.orderDate as orderDate, sum(so.grandTotalAmount) as grandTotal from Order so join so.organization o join so.documentType dt where so.documentStatus in ('CO', 'CL') and (dt.sOSubType is null or dt.sOSubType <> 'OB') and so.grandTotalAmount <> 0 and so.orderDate >= TO_DATE('03-20-2017', 'MM-DD-YYYY') and exists (select 1 from FIN_Payment_ScheduleDetail fpsd, FIN_Payment_Schedule fps where fps = fpsd.orderPaymentSchedule and fps.order = so and fpsd.paymentDetails is not null) and o.id in (:organizationList) and so.orderDate >= :dateFrom and so.orderDate <= :dateTo and 1=1 group by o.name, so.orderDate order by so.orderDate] org.hibernate.QueryException: Not all named parameters have been set: [dateTo, dateFrom] [select o.name as organizationName, so.orderDate as orderDate, sum(so.grandTotalAmount) as grandTotal from Order so join so.organization o join so.documentType dt where so.documentStatus in ('CO', 'CL') and (dt.sOSubType is null or dt.sOSubType <> 'OB') and so.grandTotalAmount <> 0 and so.orderDate >= TO_DATE('03-20-2017', 'MM-DD-YYYY') and exists (select 1 from FIN_Payment_ScheduleDetail fpsd, FIN_Payment_Schedule fps where fps = fpsd.orderPaymentSchedule and fps.order = so and fpsd.paymentDetails is not null) and o.id in (:organizationList) and so.orderDate >= :dateFrom and so.orderDate <= :dateTo and 1=1 group by o.name, so.orderDate order by so.orderDate] at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:338) at org.hibernate.impl.AbstractQueryImpl.verifyParameters(AbstractQueryImpl.java:322) at org.hibernate.impl.QueryImpl.list(QueryImpl.java:98) at org.openbravo.client.querylist.QueryListDataSource.getData(QueryListDataSource.java:281) at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetchJSONObject(ReadOnlyDataSourceService.java:149) at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetch(ReadOnlyDataSourceService.java:73) at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:285) at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:841) at javax.servlet.http.HttpServlet.service(HttpServlet.java:650) at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:228) at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:454) at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87) at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:58) at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:153) at javax.servlet.http.HttpServlet.service(HttpServlet.java:731) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.openbravo.utils.SessionExpirationFilter.doFilter(SessionExpirationFilter.java:66) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.openbravo.utils.CharsetFilter.doFilter(CharsetFilter.java:35) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 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:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) 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:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:218) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:442) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1083) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:640) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Thread.java:745) | |||||||
Proposed Solution | Remove the request if parameters have not yet been set in first run | |||||||
Tags | Performance | |||||||
Attached Files | ||||||||
![]() |
|
![]() |
|
(0097587) hgbot (developer) 2017-06-22 14:03 |
Repository: erp/devel/pi Changeset: 12dac8fcf979eb012b508946f878db192718b6cb Author: Carlos Aristu <carlos.aristu <at> openbravo.com> Date: Thu Jun 22 13:54:18 2017 +0200 URL: http://code.openbravo.com/erp/devel/pi/rev/12dac8fcf979eb012b508946f878db192718b6cb [^] fixes bug 36115: Error when adding widgets if mandatory params aren't set After adding a widget in the workspace, a request was fired even if the mandatory parameters were not set. This could cause the failure of the query launched by the datasource because the parameters expected by the query were not resolved. Note that this problem does not affect to the 'showAll' and 'RowsNumber' standard parameters because the datasource handles properly the case of not receiving these parameters in the request. To fix this error, now the requests to retrieve/refesh the widget data are prevented if not all the mandatory parameters are set. --- M modules/org.openbravo.client.querylist/web/org.openbravo.client.querylist/js/ob-querylist-widget.js --- |
(0097613) inigosanchez (viewer) 2017-06-23 13:46 |
Tested and verified in pi@d816955a96eb |
(0097615) hudsonbot (viewer) 2017-06-23 13:53 |
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/678e11052373 [^] Maturity status: Test |
![]() |
|||
Date Modified | Username | Field | Change |
2017-05-26 10:48 | eduardo_Argal | New Issue | |
2017-05-26 10:48 | eduardo_Argal | Assigned To | => platform |
2017-05-26 10:48 | eduardo_Argal | OBNetwork customer | => No |
2017-05-26 10:48 | eduardo_Argal | Modules | => Core |
2017-05-26 10:48 | eduardo_Argal | Triggers an Emergency Pack | => No |
2017-06-02 11:17 | alostale | Tag Attached: Performance | |
2017-06-02 11:17 | alostale | Status | new => acknowledged |
2017-06-16 12:39 | eduardo_Argal | OBNetwork customer | No => Yes |
2017-06-16 12:39 | eduardo_Argal | Resolution time | => 1498773600 |
2017-06-22 13:33 | caristu | Assigned To | platform => caristu |
2017-06-22 14:03 | hgbot | Checkin | |
2017-06-22 14:03 | hgbot | Note Added: 0097587 | |
2017-06-22 14:03 | hgbot | Status | acknowledged => resolved |
2017-06-22 14:03 | hgbot | Resolution | open => fixed |
2017-06-22 14:03 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/12dac8fcf979eb012b508946f878db192718b6cb [^] |
2017-06-22 14:04 | caristu | Review Assigned To | => inigosanchez |
2017-06-23 13:46 | inigosanchez | Note Added: 0097613 | |
2017-06-23 13:46 | inigosanchez | Status | resolved => closed |
2017-06-23 13:46 | inigosanchez | Fixed in Version | => 3.0PR17Q3 |
2017-06-23 13:53 | hudsonbot | Checkin | |
2017-06-23 13:53 | hudsonbot | Note Added: 0097615 |
Copyright © 2000 - 2009 MantisBT Group |