Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0039578Openbravo ERPA. Platformpublic2018-11-01 08:282018-11-02 10:38
alostale 
alostale 
urgentmajoralways
closedfixed 
5
 
3.0PR18Q3.33.0PR18Q3.3 
AugustoMauch
Core
No
0039578: JDK 10+: cannot send email
It is not possible to send emails using Java 10 or 11.
1. Open Client window and configure Email settings tabs
2. Create and complete a Sales Invoice
3. Click on Email toolbar button and send it
  -> ERROR: "An unexpected error has occurred"
   In logs:
java.lang.NoClassDefFoundError: com/sun/activation/registries/LogSupport
    at javax.activation.MailcapCommandMap.<init>(MailcapCommandMap.java:179)
    at javax.activation.CommandMap.getDefaultCommandMap(CommandMap.java:85)
    at javax.activation.DataHandler.getCommandMap(DataHandler.java:167)
    at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:629)
    at javax.activation.DataHandler.writeTo(DataHandler.java:329)
    at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:340)
    at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1573)
    at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1172)
    at javax.mail.internet.MimeMultipart.updateHeaders(MimeMultipart.java:522)
    at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1531)
    at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2271)
    at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2231)
    at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1910)
    at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1315)
    at org.openbravo.erpCommon.utility.poc.EmailManager.sendEmail(EmailManager.java:224)
No tags attached.
blocks defect 0039576 closed alostale JDK 9+: cannot send email 
Issue History
2018-11-01 08:30alostaleTypedefect => backport
2018-11-01 08:30alostaleTarget Version => 3.0PR18Q3.3
2018-11-01 12:24hgbotCheckin
2018-11-01 12:24hgbotNote Added: 0107709
2018-11-01 12:24hgbotStatusscheduled => resolved
2018-11-01 12:24hgbotResolutionopen => fixed
2018-11-01 12:24hgbotFixed in SCM revision => http://code.openbravo.com/erp/backports/3.0PR18Q3.3/rev/091e374d8f51c5927da6bd6ec37cfb1af91c8dac [^]
2018-11-01 12:43hgbotCheckin
2018-11-01 12:43hgbotNote Added: 0107710
2018-11-02 10:38AugustoMauchReview Assigned Tocaristu => AugustoMauch
2018-11-02 10:38AugustoMauchNote Added: 0107718
2018-11-02 10:38AugustoMauchStatusresolved => closed
2018-11-02 10:38AugustoMauchFixed in Version => 3.0PR18Q3.3

Notes
(0107709)
hgbot   
2018-11-01 12:24   
Repository: erp/backports/3.0PR18Q3.3
Changeset: 091e374d8f51c5927da6bd6ec37cfb1af91c8dac
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 01 09:54:53 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.3/rev/091e374d8f51c5927da6bd6ec37cfb1af91c8dac [^]

fixed bug 39578: cannot send email with JDK9+

  It was not possible because mail libraries relies on some classes that were
  in hidden modules by default starting from JDK 9 and completelly removed in
  11.

  Fixed by replacing javax.activation-api-1.2.0 by javax.activation-1.2.0
  (com.sun.activation:javax.activation).

  Note javax.activation-api is not purely an API but it also includes implementation
  for classes in javax.activation package (which was included in previous JDKs)
  but it depends on classes in com.sun.activation which have also been removed
  from JDK and not included in activation-api jar but yes in activation one.

  The contents of javax.activation package are identicall in both jars.

  Note also javax.mail-1.6.1 depends on activation-1.1 (javax.activation:activation)
  to manage MIME data, that version was released in 2009; newer javax.activation-1.2.0
  (2017) has same API including new fixes.

---
M legal/Licensing.txt
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
A lib/runtime/javax.activation-1.2.0.jar
R lib/runtime/javax.activation-api-1.2.0.jar
---
(0107710)
hgbot   
2018-11-01 12:43   
Repository: erp/backports/3.0PR18Q3.3
Changeset: f6b82d4591f7e5ef0376d517c1b6860dc82393e9
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 01 12:43:40 2018 +0100
URL: http://code.openbravo.com/erp/backports/3.0PR18Q3.3/rev/f6b82d4591f7e5ef0376d517c1b6860dc82393e9 [^]

related to bug 39578: partial back out of changeset 091e374d8f51c592

  as it contained unintended unrelated changes

---
M modules/org.openbravo.apachejdbcconnectionpool/src/org/openbravo/apachejdbcconnectionpool/JdbcExternalConnectionPool.java
---
(0107718)
AugustoMauch   
2018-11-02 10:38   
Code reviewed and verified