Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0028949Openbravo ERPA. Platformpublic2015-02-16 10:512015-02-23 05:11
caristu 
alostale 
immediatemajoralways
closedfixed 
5
 
3.0PR15Q2 
AugustoMauch
Core
Production - QA Approved
2014-09-04
3.0PR15Q1
https://code.openbravo.com/erp/devel/pi/rev/052f7ae68918 [^]
No
0028949: Business objects with document number can not be created from background processes
Business objects with document number can not be created from background processes under some circumstances. When saving this type of entities using DAL, the SetDocumentNoHandler event handler is executed in order to properly set the document number properly.

Inside the handleEvent() method, if the following statement is executed:

String windowId = RequestContext.get().getRequestParameter("windowId");

the following exception is thrown:

java.lang.NullPointerException
    at org.openbravo.client.kernel.RequestContext.getRequestParameter(RequestContext.java:111)

This is because the getRequest() method of the RequestContext class is returning a null object and therefore the getRequest().getParameter(name) throws a null pointer exception
1) Install the attached module, it contains a background process which generates a bank statement line.
2) Go to the [Process Request] window, create a new record for the "Bank Statement Creation" process, with timing "Run Immediately"
3) Schedule the process. Notice that the error is thrown in the log
No tags attached.
related to defect 0028129 closed alostale API break for tomcat 7 support 
related to defect 0028955 closed alostale can't use EntityPersistenceEventObserver in jUnit test cases 
caused by defect 0027244 closed alostale Tomcat 7 is not supported 
? com.openbravo.support.test-1.0.1.obx (25,063) 2015-02-16 11:31
https://issues.openbravo.com/file_download.php?file_id=7791&type=bug
Issue History
2015-02-16 10:51caristuNew Issue
2015-02-16 10:51caristuAssigned To => AugustoMauch
2015-02-16 10:51caristuModules => Core
2015-02-16 10:51caristuResolution time => 1426806000
2015-02-16 10:51caristuTriggers an Emergency Pack => No
2015-02-16 10:52caristuRegression level => Production - QA Approved
2015-02-16 10:52caristuRegression introduced in release => 3.0PR15Q1
2015-02-16 10:52caristuRegression introduced by commit => https://code.openbravo.com/erp/devel/pi/rev/052f7ae68918 [^]
2015-02-16 10:53caristuDescription Updatedbug_revision_view_page.php?rev_id=7684#r7684
2015-02-16 10:54caristuDescription Updatedbug_revision_view_page.php?rev_id=7685#r7685
2015-02-16 10:57caristuFile Added: com.openbravo.support.test.tar.gz
2015-02-16 10:58caristuIssue Monitored: networkb
2015-02-16 11:31caristuFile Deleted: com.openbravo.support.test.tar.gz
2015-02-16 11:31caristuFile Added: com.openbravo.support.test-1.0.1.obx
2015-02-16 15:24alostaleRelationship addedrelated to 0028129
2015-02-16 15:32alostaleAssigned ToAugustoMauch => alostale
2015-02-16 15:33alostaleReview Assigned To => AugustoMauch
2015-02-16 15:33alostaleRegression date => 2014-09-04
2015-02-16 17:40hgbotCheckin
2015-02-16 17:40hgbotNote Added: 0074524
2015-02-16 17:40hgbotStatusnew => resolved
2015-02-16 17:40hgbotResolutionopen => fixed
2015-02-16 17:40hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/19d74e4921d09ee1ad171b98823b34b49ee2c0cc [^]
2015-02-16 17:41alostaleRelationship addedcaused by 0027244
2015-02-16 17:45alostaleRelationship addedrelated to 0028955
2015-02-16 17:45alostaleNote Added: 0074525
2015-02-16 18:55AugustoMauchNote Added: 0074533
2015-02-16 18:55AugustoMauchStatusresolved => closed
2015-02-23 05:11hudsonbotCheckin
2015-02-23 05:11hudsonbotNote Added: 0074765

Notes
(0074524)
hgbot   
2015-02-16 17:40   
Repository: erp/devel/pi
Changeset: 19d74e4921d09ee1ad171b98823b34b49ee2c0cc
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Mon Feb 16 17:39:33 2015 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/19d74e4921d09ee1ad171b98823b34b49ee2c0cc [^]

fixed bug 28949: bg process can't insert DAL object having doc no column

  The problem was caused by SetDocumentNoHandler which assumed there was always
  a valid request.

  After changes to support tomcat 7, this was not the case of bg processes.

  The fix return null in this case rather than throwing a NPE.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/RequestContext.java
---
(0074525)
alostale   
2015-02-16 17:45   
can't execute written test case till 0028955 is not fixed
(0074533)
AugustoMauch   
2015-02-16 18:55   
Code reviewed and verified in pi@19d74e4921d0
(0074765)
hudsonbot   
2015-02-23 05:11   
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/6856352d7235 [^]
Maturity status: Test