Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0020859Openbravo ERPA. Platformpublic2012-06-25 18:462012-06-28 16:59
VictorVillar 
alostale 
immediatemajoralways
closedfixed 
5
pi 
3.0MP13 
Core
Pre packaging ( pi )
2012-06-13
http://code.openbravo.com/erp/devel/pi/rev/ddef3520f532c1a44e73122526954f13e793c821 [^]
No
0020859: Alert management window does not show any information
Alert management window does not show any information in PI:

http://live.builds.openbravo.com/int-full-pgsql/security/Login_FS.html [^]
As group admin role,
We can see that there is one alert launched

Go to Alert management window does not show any information.

It seems that a recent change has caused this regression
No tags attached.
related to design defect 00207333.0MP13 closed mtaal Json serialization: always the identifier properties of associated entities are serialized also, resulting in extra queries 
Issue History
2012-06-25 18:46VictorVillarNew Issue
2012-06-25 18:46VictorVillarAssigned To => alostale
2012-06-25 18:46VictorVillarModules => Core
2012-06-25 18:48VictorVillarRegression level => Pre packaging ( pi )
2012-06-25 18:48VictorVillarSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=3570#r3570
2012-06-25 18:48VictorVillarIssue Monitored: networkb
2012-06-26 13:24alostalePriorityurgent => immediate
2012-06-26 15:30alostaleNote Added: 0050091
2012-06-26 16:08alostaleRegression date => 2012-06-13
2012-06-26 16:08alostaleRegression introduced by commit => http://code.openbravo.com/erp/devel/pi/rev/ddef3520f532c1a44e73122526954f13e793c821 [^]
2012-06-26 16:09alostaleRelationship addedrelated to 0020733
2012-06-26 16:14alostaleNote Added: 0050095
2012-06-26 16:30hgbotCheckin
2012-06-26 16:30hgbotNote Added: 0050096
2012-06-26 16:30hgbotStatusnew => resolved
2012-06-26 16:30hgbotResolutionopen => fixed
2012-06-26 16:30hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/197584d2097623371a53d3b6583f40af746ffacf [^]
2012-06-27 20:42hudsonbotCheckin
2012-06-27 20:42hudsonbotNote Added: 0050214
2012-06-28 16:59AugustoMauchNote Added: 0050260
2012-06-28 16:59AugustoMauchStatusresolved => closed
2012-06-28 16:59AugustoMauchFixed in Version => 3.0MP13

Notes
(0050091)
alostale   
2012-06-26 15:30   
This is the error stack trace:

1f923ef8 309992 [http-8080-5] ERROR org.hibernate.hql.PARSER - Invalid path: 'alertRule.id'
1f923ef8 310011 [http-8080-5] ERROR org.hibernate.hql.PARSER - <AST>: expecting IN_LIST, found '<empty tree>'
1f923ef8 310012 [http-8080-5] ERROR org.hibernate.hql.PARSER - left-hand operand of in operator was null
1f923ef8 310017 [http-8080-5] ERROR org.openbravo.base.exception.OBException - Exception when creating query select e from ADAlert as e left join fetch e.client as join_0 left join fetch e.organization as join_1 left join fetch e.createdBy as join_2 left join fetch e.updatedBy as join_3 left join fetch e.alertRule as join_4 left join fetch e.role as join_5 left join fetch e.userContact as join_6 left join fetch e.warehouse as join_7 where ( coalesce(to_char(status), 'NEW') = upper('New') and alertRule.id in ('800003') ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0') and e.active='Y' order by e.creationDate desc ,e.id
org.hibernate.hql.ast.QuerySyntaxException: Invalid path: 'alertRule.id' [select e from ADAlert as e left join fetch e.client as join_0 left join fetch e.organization as join_1 left join fetch e.createdBy as join_2 left join fetch e.updatedBy as join_3 left join fetch e.alertRule as join_4 left join fetch e.role as join_5 left join fetch e.userContact as join_6 left join fetch e.warehouse as join_7 where ( coalesce(to_char(status), 'NEW') = upper('New') and alertRule.id in ('800003') ) and e.organization.id in ('E443A31992CB4635AFCAEABE7183CE85', '0', 'DC206C91AA6A4897B44DA897936E0EC3', '7BABA5FF80494CAFA54DEBD22EC46F01', 'BAE22373FEBE4CCCA24517E23F0C8A48', '19404EAD144C49A0AF37D54377CF452D', 'B843C30461EA4501935CB1D125C9C25A', '2E60544D37534C0B89E765FE29BC0B43') and e.client.id in ('23C59575B9CF467C9620760EB255B389', '0') and e.active='Y' order by e.creationDate desc ,e.id]
    at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:54)
    at org.hibernate.hql.ast.QuerySyntaxException.convert(QuerySyntaxException.java:47)
    at org.hibernate.hql.ast.ErrorCounter.throwQueryException(ErrorCounter.java:82)
    at org.hibernate.hql.ast.QueryTranslatorImpl.analyze(QueryTranslatorImpl.java:261)
    at org.hibernate.hql.ast.QueryTranslatorImpl.doCompile(QueryTranslatorImpl.java:185)
    at org.hibernate.hql.ast.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:136)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:101)
    at org.hibernate.engine.query.HQLQueryPlan.<init>(HQLQueryPlan.java:80)
    at org.hibernate.engine.query.QueryPlanCache.getHQLQueryPlan(QueryPlanCache.java:124)
    at org.hibernate.impl.AbstractSessionImpl.getHQLQueryPlan(AbstractSessionImpl.java:156)
    at org.hibernate.impl.AbstractSessionImpl.createQuery(AbstractSessionImpl.java:135)
    at org.hibernate.impl.SessionImpl.createQuery(SessionImpl.java:1770)
    at org.openbravo.dal.service.OBQuery.createQuery(OBQuery.java:228)
    at org.openbravo.dal.service.OBQuery.list(OBQuery.java:113)
    at org.openbravo.service.json.DataEntityQueryService.list(DataEntityQueryService.java:91)
    at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:134)
    at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:72)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:242)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:575)
    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:428)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:87)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:124)
    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:679)
(0050095)
alostale   
2012-06-26 16:14   
This issue is introduced by fix for 0020733.

After this fix the query executed is like:

 as e left join fetch e.client as join_0 left join fetch e.organization as join_1 left join fetch e.createdBy as join_2 left join fetch e.updatedBy as join_3 left join fetch e.alertRule as join_4 left join fetch e.role as join_5 left join fetch e.userContact as join_6 left join fetch e.warehouse as join_7
 where
 coalesce(to_char(status), 'NEW') = upper('Suppressed') and alertRule.id in ('800003') order by e.id

Before the fix it was:

as e where coalesce(to_char(status), 'NEW') = upper('New') and alertRule.id in ('800003')

the problem is in alertRule.id part, after 0020733 e alias is required, so 0020733 created a hidden API change.

Next actions:
-0020733 is going to be reverted because it doesn't work as expected under some circumstances. So no API change
-Add aliases to query to prevent future problems (it is more correct in fact)
(0050096)
hgbot   
2012-06-26 16:30   
Repository: erp/devel/pi
Changeset: 197584d2097623371a53d3b6583f40af746ffacf
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Tue Jun 26 16:29:42 2012 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/197584d2097623371a53d3b6583f40af746ffacf [^]

fixed bug 20859: Alert management window does not show any information

Added alias to fix HQL syntax

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/alert-management/ob-alert-grid.js
---
(0050214)
hudsonbot   
2012-06-27 20:42   
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/57da6de99a39 [^]

Maturity status: Test
(0050260)
AugustoMauch   
2012-06-28 16:59   
Code reviewed and verified in pi@e40f0602d615