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

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0029665
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2015-04-22 11:122015-05-07 22:17
ReporterumartirenaView Statuspublic 
Assigned Tocaristu 
PriorityimmediateResolutionfixedFixed in Version3.0PR15Q3
StatusclosedFix in branchFixed in SCM revisione9d6d5b57fd1
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0029665: NPE Error raised when using HQL Based Tables on a tab (level 2) inside a standard window (not P&E)

DescriptionNPE Error raised when using HQL Based Tables on a tab (level 2) inside a standard window (not P&E).

Steps To ReproduceInstall the following module:
 
https://code.openbravo.com/erp/mods/org.openbravo.costing.explaincostadjustments/ [^]

As F&B Group Admin:

 * Go to Product Window and select any product (i.e. "Cerveza Ale 0,5L").
 * Go to Costing Tab.
 * Check that an error has been raised in the log.

c59635e2 6336371 [http-8080-4] ERROR org.openbravo.service.datasource.DataSourceServlet -
java.lang.NullPointerException
    at org.openbravo.service.datasource.HQLDataSourceService.existsInsertionPoint(HQLDataSourceService.java:482)
    at org.openbravo.service.datasource.HQLDataSourceService.fillInInsertionPoints(HQLDataSourceService.java:374)
    at org.openbravo.service.datasource.HQLDataSourceService.getQuery(HQLDataSourceService.java:311)
    at org.openbravo.service.datasource.HQLDataSourceService.getData(HQLDataSourceService.java:165)
    at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetchJSONObject(ReadOnlyDataSourceService.java:137)
    at org.openbravo.service.datasource.ReadOnlyDataSourceService.fetch(ReadOnlyDataSourceService.java:70)
    at org.openbravo.service.datasource.DataSourceServlet.doFetch(DataSourceServlet.java:261)
    at org.openbravo.service.datasource.DataSourceServlet.doPost(DataSourceServlet.java:747)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:643)
    at org.openbravo.base.HttpBaseServlet.serviceInitialized(HttpBaseServlet.java:222)
    at org.openbravo.base.secureApp.HttpSecureAppServlet.service(HttpSecureAppServlet.java:449)
    at org.openbravo.client.kernel.BaseKernelServlet.callServiceInSuper(BaseKernelServlet.java:88)
    at org.openbravo.client.kernel.BaseKernelServlet.service(BaseKernelServlet.java:59)
    at org.openbravo.service.datasource.DataSourceServlet.service(DataSourceServlet.java:140)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
    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:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:701)
Proposed SolutionThe problem seems to be that the HQL Query is being executed even when the tab of level two is not being opened. At this point hqlquery variable that should contain the hqlquery is still null, and NPE error is obtained.

The query should not be executed till the level 2 tab is opened.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to defect 0029667 closedcaristu NPE Error raised when a tab is child of another tab that as table has an HQL Query table 
related to feature request 00259963.0PR14Q3 closedAugustoMauch HQL based tables 

-  Notes
(0076685)
umartirena (developer)
2015-04-22 11:13
edited on: 2015-04-22 12:00

The issue is being reported as an immediate because the module mentioned in the Steps to Reproduce has to be published at the same time of PR15Q1.4.

(0076750)
caristu (developer)
2015-04-24 12:53
edited on: 2015-04-24 12:54

In the module[1], if the Costing Adjustments tab is configured to have a parent key reference column, i.e, the m_costing_id set as link to parent and the tab has the disable parent key property unchecked, the problem is not reproducible. This would be the correct configuration for the tab.

In any case, this error should be controlled in the code, in case other tabs are configured in this way.

[1] https://code.openbravo.com/erp/mods/org.openbravo.costing.explaincostadjustments/ [^]

(0076845)
hgbot (developer)
2015-04-29 08:53

Repository: erp/devel/pi
Changeset: e9d6d5b57fd1a6aadff36076f1d679dcee0975c7
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Apr 29 08:53:03 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/e9d6d5b57fd1a6aadff36076f1d679dcee0975c7 [^]

fixes issue 29665: NP Error raised when using HQL Based Tables on a level 2 tab

A unnecessary request was being done when accessing to the HQL query based subtab. This was caused because the tab was not being identified properly as a subtab.
The view.parentProperty was used to identify if we are on a child tab. This property could be undefined depending on the configuration of the tab in the application dictionary.
Now view.parentView is used instead of view.parentProperty because it does not return undefined in this cases

---
M modules/org.openbravo.client.application/web/org.openbravo.client.application/js/grid/ob-view-grid.js
---
(0076857)
alostale (developer)
2015-04-29 11:04

code reviewed + tested
(0077177)
hudsonbot (developer)
2015-05-07 22:17

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/a1817f84bd8b [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2015-04-22 11:12 umartirena New Issue
2015-04-22 11:12 umartirena Assigned To => platform
2015-04-22 11:12 umartirena Modules => Core
2015-04-22 11:12 umartirena Triggers an Emergency Pack => No
2015-04-22 11:13 umartirena Note Added: 0076685
2015-04-22 12:00 umartirena Note Edited: 0076685 View Revisions
2015-04-23 08:52 alostale Relationship added related to 0029667
2015-04-23 08:52 alostale Assigned To platform => caristu
2015-04-24 08:42 alostale Relationship added related to 0025996
2015-04-24 12:53 caristu Note Added: 0076750
2015-04-24 12:54 caristu Note Edited: 0076750 View Revisions
2015-04-29 08:51 caristu Review Assigned To => alostale
2015-04-29 08:51 caristu Issue Monitored: alostale
2015-04-29 08:53 hgbot Checkin
2015-04-29 08:53 hgbot Note Added: 0076845
2015-04-29 08:53 hgbot Status new => resolved
2015-04-29 08:53 hgbot Resolution open => fixed
2015-04-29 08:53 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/e9d6d5b57fd1a6aadff36076f1d679dcee0975c7 [^]
2015-04-29 11:04 alostale Note Added: 0076857
2015-04-29 11:04 alostale Status resolved => closed
2015-04-29 11:04 alostale Fixed in Version => 3.0PR15Q3
2015-05-07 22:17 hudsonbot Checkin
2015-05-07 22:17 hudsonbot Note Added: 0077177


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker