Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0028047 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Openbravo ERP] A. Platform | minor | have not tried | 2014-11-01 14:28 | 2014-12-30 23:27 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | NaroaIriarte | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | 3.0PR15Q1 | |||
Status | closed | Fix in branch | Fixed in SCM revision | cfa2b4b9d30f | ||||
Projection | none | ETA | none | Target Version | 3.0PR15Q1 | |||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | alostale | |||||||
Web browser | ||||||||
Modules | Core | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0028047: Log shows error which is actively (and correctly ignored) in AdvancedQueryBuilder, prevent this exception from showing | |||||||
Description | - a selector with a where clause with a parameter which is stored in the context, for example this where clause: e.active = true and exists (select 1 from FinancialMgmtAcctSchemaElement c where c.accountingSchema.id=@EM_Obfdr_Acctschema_ID@ and c.accountingElement.id = e.accountingElement.id) - the parameter name ends with _ID therefore the advancedquerybuilder tries to resolve it against a entity which does not work - the exception is actively ignored and the next if will get the value correctly from the context. This is correct. The problem is that the log shows an error while the value is present in the context correctly. 250403 [http-8080-6] ERROR org.openbravo.base.util.CheckException - Property with EM_Obfdr_Acctschema_ID does not exist for entity OBANALY_Cube_Rep_Dim org.openbravo.base.util.CheckException: Property with EM_Obfdr_Acctschema_ID does not exist for entity OBANALY_Cube_Rep_Dim at org.openbravo.base.util.Check.isNotNull(Check.java:72) at org.openbravo.base.model.Entity.getPropertyByColumnName(Entity.java:572) at org.openbravo.service.json.AdvancedQueryBuilder.substituteContextParameters(AdvancedQueryBuilder.java:1200) at org.openbravo.service.json.AdvancedQueryBuilder.substituteParameters(AdvancedQueryBuilder.java:362) at org.openbravo.service.json.AdvancedQueryBuilder.getWhereClause(AdvancedQueryBuilder.java:209) at org.openbravo.service.json.AdvancedQueryBuilder.getJoinClause(AdvancedQueryBuilder.java:1302) at org.openbravo.service.json.DataEntityQueryService.buildOBQuery(DataEntityQueryService.java:125) at org.openbravo.service.json.DataEntityQueryService.list(DataEntityQueryService.java:108) at org.openbravo.service.json.DefaultJsonDataService.fetch(DefaultJsonDataService.java:200) at org.openbravo.service.datasource.DefaultDataSourceService.fetch(DefaultDataSourceService.java:72) at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:261) at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:744) 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:449) at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:92) at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:63) at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:140) 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.codehaus.enunciate.webapp.HTTPRequestContextFilter.doFilter(HTTPRequestContextFilter.java:36) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.client.analytics.OBSpringSecurityContextRequestFilter$1.doAction(OBSpringSecurityContextRequestFilter.java:71) at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46) at org.openbravo.client.analytics.OBSpringSecurityContextRequestFilter.doFilter(OBSpringSecurityContextRequestFilter.java:79) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.openbravo.activiti.OBActivitiRequestFilter$1.doAction(OBActivitiRequestFilter.java:68) at org.openbravo.dal.core.ThreadHandler.run(ThreadHandler.java:46) at org.openbravo.activiti.OBActivitiRequestFilter.doFilter(OBActivitiRequestFilter.java:81) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) 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:745) | |||||||
Steps To Reproduce | 1) Install analytics module 2) create a cube definition 3) create a child cube report (any value is fine) 4) create a child cube report dimension (any value is fine), this will already show the same error in the log (the functionality works fine) 5) create a cube report dimension element See the attached screenshot | |||||||
Proposed Solution | Check before throwing an exception, so do not show the exception in the log. | |||||||
Tags | No tags attached. | |||||||
Attached Files | Selection_066.png [^] (287,104 bytes) 2014-11-01 14:28 Selection_067.png [^] (399,150 bytes) 2014-11-01 14:34 | |||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |||||||||||||||||||||||||
|
Notes | |
(0071319) mtaal (manager) 2014-11-01 14:30 |
See here for docs on how to setup a cube which results in the exception in the log: http://wiki.openbravo.com/wiki/Modules:Dimensional_Profit_And_Loss#Configure_Profit_And_Loss_Accounts [^] Check the related issue also. |
(0072403) hgbot (developer) 2014-12-10 15:16 |
Repository: erp/devel/pi Changeset: cfa2b4b9d30f6b25fd348ce6c130d6ad7996f225 Author: Naroa Iriarte <naroa.iriarte <at> openbravo.com> Date: Wed Dec 10 14:30:29 2014 +0100 URL: http://code.openbravo.com/erp/devel/pi/rev/cfa2b4b9d30f6b25fd348ce6c130d6ad7996f225 [^] Fixed issue 28047:An exception is shown in console. There was an exception that was ignored (this is a correct behaviour), but it was shown in the log. This exception appeared when, in cube definition window a cube Report Dimension was created. Then the log showed the exception, but the Cube Report Dimension was correctly created. So, the exception needed not to be shown. For fixing this the "AdvancedQueryBuilder" java class has been modified. The exception was thrown before because the method <getPropertyByColumnName(String ColumName)> was called and this method always checks the "isNotNull". When the variable was null, the message and the exception was catched and shown. For avoiding this, the method <getPropertyByColumnName(param, checkIsNoNull)> has been called instead the other one. This method, has an input parameter called "checkIsNotNull", putting this to false, avoids the evaluation of the function "isNotNull", so, if the variable is null it doesn't matter and the message and the exception shown before does not appear now. The problem is that we get a "nullPointerException" if we do nothing else more. For avoiding this, a condition has been added to the code in the "AdvancedQueryBuilder" java class. If the prop variable is null, the paramValue variable gets the empty string value. And as the value for paramValue variable cannot be reached from the request, it is get from the context. --- M modules/org.openbravo.service.json/src/org/openbravo/service/json/AdvancedQueryBuilder.java --- |
(0072404) alostale (manager) 2014-12-10 15:17 |
code reviewed tested based on explained steps to reproduce + related issue 0026871 |
(0073205) hudsonbot (developer) 2014-12-30 23:27 |
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/6525fe229e06 [^] Maturity status: Test |
Issue History | |||
Date Modified | Username | Field | Change |
2014-11-01 14:28 | mtaal | New Issue | |
2014-11-01 14:28 | mtaal | Assigned To | => AugustoMauch |
2014-11-01 14:28 | mtaal | File Added: Selection_066.png | |
2014-11-01 14:28 | mtaal | Modules | => Core |
2014-11-01 14:28 | mtaal | Triggers an Emergency Pack | => No |
2014-11-01 14:30 | mtaal | Note Added: 0071319 | |
2014-11-01 14:32 | mtaal | Relationship added | causes 0026721 |
2014-11-01 14:34 | mtaal | File Added: Selection_067.png | |
2014-11-03 10:12 | ngarcia | Issue Monitored: ngarcia | |
2014-11-28 09:17 | alostale | Assigned To | AugustoMauch => NaroaIriarte |
2014-12-10 13:49 | alostale | Relationship added | related to 0026871 |
2014-12-10 13:50 | alostale | Relationship replaced | related to 0026721 |
2014-12-10 15:16 | hgbot | Checkin | |
2014-12-10 15:16 | hgbot | Note Added: 0072403 | |
2014-12-10 15:16 | hgbot | Status | new => resolved |
2014-12-10 15:16 | hgbot | Resolution | open => fixed |
2014-12-10 15:16 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/cfa2b4b9d30f6b25fd348ce6c130d6ad7996f225 [^] |
2014-12-10 15:17 | alostale | Review Assigned To | => alostale |
2014-12-10 15:17 | alostale | Note Added: 0072404 | |
2014-12-10 15:17 | alostale | Status | resolved => closed |
2014-12-10 15:17 | alostale | Fixed in Version | => 3.0PR15Q1 |
2014-12-30 23:27 | hudsonbot | Checkin | |
2014-12-30 23:27 | hudsonbot | Note Added: 0073205 | |
2015-03-13 15:46 | Orekaria | Relationship added | related to 0027048 |
Copyright © 2000 - 2009 MantisBT Group |