Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0029667Openbravo ERPA. Platformpublic2015-04-22 12:002015-05-07 22:17
umartirena 
caristu 
immediatemajoralways
closedfixed 
5
 
3.0PR15Q3 
alostale
Core
No
0029667: NPE Error raised when a tab is child of another tab that as table has an HQL Query table
NPE Error raised when a tab is child of another tab that as table has an HQL Query table.

This happens when there is any column on child table that is set as "Link to Parent Column"
Install the following module:
 
https://code.openbravo.com/erp/mods/org.openbravo.costing.explaincostadjustments [^]

As F&B Group Admin:

* Create a product
* Add a purchase and sales price list. 10 for both
* Enter a cost in the costing tab:
 - Org: F&B EspaƱa
 - Cost Type: Average
 - Cost: 5
 - Starting Date: 01/01/2014
 - Ending Date: 31/12/9999
 - Warehouse: Empty

* Create a shipment dated on 25/01/2015 for that product
* Complete the shipment.

* Create a receipt dated on 15/01/2015 (backdated transaction) again for that product
* Complete the receipt.

* In Process request: Launch Costing Background process.

* Go back to Product window and select the product.
* Go to Costing Tab.
* Go to Costing Transactions tab.
* Select any row with adjustment amount different to Zero.
* Go to Transaction Adjustments.
* Select any line and open it in form view.

* Realize that an error is obtained:

java.lang.NullPointerException
    at org.openbravo.client.application.window.FormInitializationComponent.setSessionVariablesInParent(FormInitializationComponent.java:939)
    at org.openbravo.client.application.window.FormInitializationComponent.execute(FormInitializationComponent.java:239)
    at org.openbravo.client.kernel.BaseActionHandler.execute(BaseActionHandler.java:71)
    at org.openbravo.client.kernel.KernelServlet.processActionRequest(KernelServlet.java:294)
    at org.openbravo.client.kernel.KernelServlet.doGet(KernelServlet.java:186)
    at org.openbravo.client.kernel.KernelServlet.doPost(KernelServlet.java:267)
    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.client.kernel.KernelServlet.service(KernelServlet.java:168)
    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)


No tags attached.
related to feature request 00259963.0PR14Q3 closed AugustoMauch HQL based tables 
related to defect 0029665 closed caristu NPE Error raised when using HQL Based Tables on a tab (level 2) inside a standard window (not P&E) 
Issue History
2015-04-22 12:00umartirenaNew Issue
2015-04-22 12:00umartirenaAssigned To => platform
2015-04-22 12:00umartirenaModules => Core
2015-04-22 12:00umartirenaTriggers an Emergency Pack => No
2015-04-22 12:00umartirenaNote Added: 0076686
2015-04-22 12:03umartirenaDescription Updatedbug_revision_view_page.php?rev_id=8327#r8327
2015-04-23 08:52alostaleRelationship addedrelated to 0029665
2015-04-23 08:52alostaleAssigned Toplatform => caristu
2015-04-23 09:50umartirenaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8335#r8335
2015-04-23 10:33umartirenaSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=8336#r8336
2015-04-24 08:42alostaleRelationship addedrelated to 0025996
2015-04-29 08:56caristuReview Assigned To => alostale
2015-04-29 08:56caristuIssue Monitored: alostale
2015-04-29 08:57hgbotCheckin
2015-04-29 08:57hgbotNote Added: 0076846
2015-04-29 08:57hgbotStatusnew => resolved
2015-04-29 08:57hgbotResolutionopen => fixed
2015-04-29 08:57hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/1bd95ea2cdb42ce4e2d660ee38e5463044950be1 [^]
2015-04-29 11:04alostaleNote Added: 0076858
2015-04-29 11:04alostaleStatusresolved => closed
2015-04-29 11:04alostaleFixed in Version => 3.0PR15Q3
2015-05-07 22:17hudsonbotCheckin
2015-05-07 22:17hudsonbotNote Added: 0077178

Notes
(0076686)
umartirena   
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.
(0076846)
hgbot   
2015-04-29 08:57   
Repository: erp/devel/pi
Changeset: 1bd95ea2cdb42ce4e2d660ee38e5463044950be1
Author: Carlos Aristu <carlos.aristu <at> openbravo.com>
Date: Wed Apr 29 08:55:42 2015 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/1bd95ea2cdb42ce4e2d660ee38e5463044950be1 [^]

fixes issue 29667: NPE Error when a child tab is based on an HQL Query table

The NPE was raised because the code was retrieving the entity for a table not based on a db table. This kind of tables do not have BaseOBObjects.
The FIC was already controlling this when the tab has a related table of this type but it was not considering the case when the parent table is related to a table of this type.

---
M modules/org.openbravo.client.application/src/org/openbravo/client/application/window/FormInitializationComponent.java
---
(0076858)
alostale   
2015-04-29 11:04   
code reviewed + tested
(0077178)
hudsonbot   
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