Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0040605Openbravo ERPA. Platformpublic2019-04-12 09:202019-04-16 08:39
alostale 
jarmendariz 
immediateminorhave not tried
closedfixed 
5
 
3.0PR19Q1.13.0PR19Q1.1 
alostale
Core
Production - Confirmed Stable
2018-07-11
3.0PR18Q4
http://code.openbravo.com/erp/devel/pi/rev/cf4416b527d97adba57b97484b66a33284101738 [^]
No
0040605: NPE sending email if timeout not set
If email configuration does not define a timeout, a NPE is thrown when trying to send email.
1. Create an Email Configuration for current Client
   -> do not set Smtp Connection Timeout field
2. Open any Sales Invoice
3. Click on the email toolbar button and click on Send after populating mandatory fields
   -> ERROR:
      * In UI "Problems while sending the email" appears
      * In openbravo.log:
2019-04-12 09:10:26,328 [http-nio-8080-exec-9] ERROR org.openbravo.erpCommon.utility.reporting.printing.PrintInvoices - error sending mail
java.lang.NullPointerException: null
    at org.openbravo.erpCommon.utility.poc.EmailManager.sendEmail(EmailManager.java:67) ~[classes/:?]
    at org.openbravo.erpCommon.utility.reporting.printing.PrintController.sendDocumentEmail(PrintController.java:821) [classes/:?]
    at org.openbravo.erpCommon.utility.reporting.printing.PrintController.post(PrintController.java:416) [classes/:?]
    at org.openbravo.erpCommon.utility.reporting.printing.PrintInvoices.doPost(PrintInvoices.java:57) [classes/:?]
        ...
No tags attached.
blocks defect 0040603 closed jarmendariz NPE sending email if timeout not set 
Issue History
2019-04-12 09:21alostaleTypedefect => backport
2019-04-12 09:21alostaleTarget Version => 3.0PR19Q1.1
2019-04-15 11:01hgbotCheckin
2019-04-15 11:01hgbotNote Added: 0111123
2019-04-15 11:01hgbotStatusscheduled => resolved
2019-04-15 11:01hgbotResolutionopen => fixed
2019-04-15 11:01hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR19Q1.1/rev/b2200ff8f174a8196c62a383878a5ff6b12da1d1 [^]
2019-04-15 12:10jarmendarizReview Assigned To => alostale
2019-04-16 08:39alostaleNote Added: 0111162
2019-04-16 08:39alostaleStatusresolved => closed
2019-04-16 08:39alostaleFixed in Version => 3.0PR19Q1.1

Notes
(0111123)
hgbot   
2019-04-15 11:01   
Repository: erp/backports/3.0PR19Q1.1
Changeset: b2200ff8f174a8196c62a383878a5ff6b12da1d1
Author: Javier Armendáriz <javier.armendariz <at> openbravo.com>
Date: Fri Apr 12 14:54:40 2019 +0200
URL: http://code.openbravo.com/erp/backports/3.0PR19Q1.1/rev/b2200ff8f174a8196c62a383878a5ff6b12da1d1 [^]

Fixed issue 40605: NPE if email timeout is not set

Adding another null check to verify not only in the case that the email config
does not exist, but also that the timeout value is empty. In both cases the
default timeout should be used.

---
M src/org/openbravo/erpCommon/utility/poc/EmailManager.java
---
(0111162)
alostale   
2019-04-16 08:39   
reviewed + tested