Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0036115
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2017-05-26 10:482017-06-23 13:53
Reportereduardo_ArgalView Statuspublic 
Assigned Tocaristu 
PriorityurgentResolutionfixedFixed in Version3.0PR17Q3
StatusclosedFix in branchFixed in SCM revision12dac8fcf979
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toinigosanchez
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0036115: A request is being sent when adding a widget even if parameters have not yet been set

DescriptionA 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 ReproduceInstall 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 SolutionRemove the request if parameters have not yet been set in first run
TagsPerformance
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(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 (developer)
2017-06-23 13:46

Tested and verified in pi@d816955a96eb
(0097615)
hudsonbot (developer)
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

- Issue History
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 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 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
Powered by Mantis Bugtracker