Openbravo Issue Tracking System - Modules
View Issue Details
0030093ModulesService Contract Managementpublic2015-06-04 13:362015-06-04 17:34
ngarcia 
vmromanos 
immediatemajoralways
closedfixed 
5
 
 
ngarcia
0030093: Contract Billing Background finishes with Error after 3.0PR15Q1
Contract Billing Background finishes with Error after 3.0PR15Q1
As group admin role:
   Apply the dataset at * level
   Create a Contract Type set as Service Contract
   Create a Contract Invoice Schedule
   Create a Contract, configure an Invoice Plan Master to it and process it selecting the option of Generating the Invoice Plan
   Schedule the Contract Billing Background process and check it finishes with Error
   The following error is shown in the log:
      ERROR org.openbravo.service.db.DalBaseProcess - The process org.openbravo.contract.services.process.billing.BackgroundInvoiceProcessHandler has thrown an exception.
java.lang.NullPointerException
    at org.openbravo.client.kernel.RequestContext.getSession(RequestContext.java:145)
The code that uses RequestContext.get().getSession() should be replaced in StandardContractInvoiceProcess.java
No tags attached.
caused by defect 0027244 closed alostale Openbravo ERP Tomcat 7 is not supported 
Issue History
2015-06-04 13:36ngarciaNew Issue
2015-06-04 13:36ngarciaAssigned To => Triage Finance
2015-06-04 13:37ngarciaRelationship addedcaused by 0027244
2015-06-04 13:37ngarciaIssue Monitored: networkb
2015-06-04 13:38ngarciaResolution time => 1436911200
2015-06-04 13:43vmromanosStatusnew => scheduled
2015-06-04 13:43vmromanosAssigned ToTriage Finance => vmromanos
2015-06-04 16:06vmromanosNote Added: 0078082
2015-06-04 16:10hgbotCheckin
2015-06-04 16:10hgbotNote Added: 0078083
2015-06-04 16:10hgbotStatusscheduled => resolved
2015-06-04 16:10hgbotResolutionopen => fixed
2015-06-04 16:10hgbotFixed in SCM revision => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/c5cfc1c84a05480533f48febc80399db55e0047d [^]
2015-06-04 16:10hgbotCheckin
2015-06-04 16:10hgbotNote Added: 0078084
2015-06-04 16:10hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/c5cfc1c84a05480533f48febc80399db55e0047d [^] => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/f39c5bf7bfa27b99af23d9e14fc55b0c477be9c3 [^]
2015-06-04 16:10hgbotCheckin
2015-06-04 16:10hgbotNote Added: 0078085
2015-06-04 16:10hgbotFixed in SCM revisionhttp://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/f39c5bf7bfa27b99af23d9e14fc55b0c477be9c3 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/18e03aff655b92a704a98a3d9ff65181820f47ce [^]
2015-06-04 17:34ngarciaReview Assigned To => ngarcia
2015-06-04 17:34ngarciaStatusresolved => closed

Notes
(0078082)
vmromanos   
2015-06-04 16:06   
Test plan:

In a 3.0PR15Q1 instance or higher, follow steps to reproduce.
Verify no error is raised by the background process
(0078083)
hgbot   
2015-06-04 16:10   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: c5cfc1c84a05480533f48febc80399db55e0047d
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 04 15:38:48 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/c5cfc1c84a05480533f48febc80399db55e0047d [^]

Fixed bug 30093: Contract Billing Background finishes with Error after 3.0PR15Q1

In case the Billing process is launched from a background process, the HttpSession is null creating a NPE starting from 3.0PR15Q1.

The solution is to catch this exception and force to use a dummy sessionId, which is not used when launched from a background process.
This change has no impact when executed before 3.0PR15Q1

---
M src/org/openbravo/contract/services/process/billing/StandardContractInvoiceProcess.java
---
(0078084)
hgbot   
2015-06-04 16:10   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: f39c5bf7bfa27b99af23d9e14fc55b0c477be9c3
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 04 15:38:48 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/f39c5bf7bfa27b99af23d9e14fc55b0c477be9c3 [^]

Fixed bug 30093: Contract Billing Background finishes with Error after 3.0PR15Q1

In case the Billing process is launched from a background process, the HttpSession is null creating a NPE starting from 3.0PR15Q1.

The solution is to catch this exception and force to use a dummy sessionId, which is not used when launched from a background process.
This change has no impact when executed before 3.0PR15Q1

---
M src/org/openbravo/contract/services/process/billing/StandardContractInvoiceProcess.java
---
(0078085)
hgbot   
2015-06-04 16:10   
Repository: erp/pmods/org.openbravo.contract.services
Changeset: 18e03aff655b92a704a98a3d9ff65181820f47ce
Author: Víctor Martínez Romanos <victor.martinez <at> openbravo.com>
Date: Thu Jun 04 15:38:48 2015 +0200
URL: http://code.openbravo.com/erp/pmods/org.openbravo.contract.services/rev/18e03aff655b92a704a98a3d9ff65181820f47ce [^]

Fixed bug 30093: Contract Billing Background finishes with Error after 3.0PR15Q1

In case the Billing process is launched from a background process, the HttpSession is null creating a NPE starting from 3.0PR15Q1.

The solution is to catch this exception and force to use a dummy sessionId, which is not used when launched from a background process.
This change has no impact when executed before 3.0PR15Q1

---
M src/org/openbravo/contract/services/process/billing/StandardContractInvoiceProcess.java
---