Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0039576
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2018-11-01 08:282018-12-11 20:22
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PriorityurgentResolutionfixedFixed in Version3.0PR19Q1
StatusclosedFix in branchFixed in SCM revision23b231580229
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version9+
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Tocaristu
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0039576: JDK 9+: cannot send email

DescriptionIt is not possible to send emails using Java 9, 10 or 11.
Steps To ReproduceIn an instance running on Java 10:

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)
Proposed SolutionWhen running on Java 9 or 10, this issue can be workarrounded by adding --add-modules=java.se.ee JVM argument.

On Java 11, there is no workaround.
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]
related to feature request 0038196 closedplatform support for JDK 10 
related to feature request 0037083 closedalostale support JDK 9 
related to feature request 0037064 closedcaristu upgrade hibernate to 5.3.2 
depends on backport 00395773.0PR18Q4 closedalostale JDK 10+: cannot send email 
depends on backport 00395783.0PR18Q3.3 closedalostale JDK 10+: cannot send email 
depends on feature request 0038130 closedcaristu support JDK 11 

-  Notes
(0107707)
hgbot (developer)
2018-11-01 11:26

Repository: erp/devel/pi
Changeset: 23b23158022977829e4eb1c88b202fa4b4a279b5
Author: Asier Lostalé <asier.lostale <at> openbravo.com>
Date: Thu Nov 01 09:54:53 2018 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/23b23158022977829e4eb1c88b202fa4b4a279b5 [^]

fixed bug 39576: cannot send email with JDK10+

  It was not possible because mail libraries relies on some classes that were
  in hidden modules by default starting from JDK 10 and completelly reomved 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
A lib/runtime/javax.activation-1.2.0.jar
R lib/runtime/javax.activation-api-1.2.0.jar
---
(0107814)
caristu (developer)
2018-11-08 19:34

Reviewed + tested OK.
(0108451)
hudsonbot (developer)
2018-12-11 20:22

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/470e3cd384c5 [^]
Maturity status: Test

- Issue History
Date Modified Username Field Change
2018-11-01 08:28 alostale New Issue
2018-11-01 08:28 alostale Assigned To => alostale
2018-11-01 08:28 alostale Modules => Core
2018-11-01 08:28 alostale Triggers an Emergency Pack => No
2018-11-01 08:29 alostale Review Assigned To => caristu
2018-11-01 08:30 alostale Status new => scheduled
2018-11-01 08:34 alostale Steps to Reproduce Updated View Revisions
2018-11-01 08:36 alostale Relationship added related to 0038196
2018-11-01 09:43 alostale Relationship added depends on 0038130
2018-11-01 10:03 alostale Proposed Solution updated
2018-11-01 11:26 hgbot Checkin
2018-11-01 11:26 hgbot Note Added: 0107707
2018-11-01 11:26 hgbot Status scheduled => resolved
2018-11-01 11:26 hgbot Resolution open => fixed
2018-11-01 11:26 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/23b23158022977829e4eb1c88b202fa4b4a279b5 [^]
2018-11-01 12:21 alostale Description Updated View Revisions
2018-11-01 12:21 alostale Proposed Solution updated
2018-11-01 12:21 alostale Summary JDK 10+: cannot send email => JDK 9+: cannot send email
2018-11-01 12:22 alostale Relationship added related to 0037083
2018-11-05 16:28 caristu Relationship added related to 0037064
2018-11-06 17:05 egoitz Issue Monitored: egoitz
2018-11-06 17:38 anderaranguren Issue Monitored: anderaranguren
2018-11-07 21:40 galderromo Issue Monitored: galderromo
2018-11-08 19:34 caristu Note Added: 0107814
2018-11-08 19:34 caristu Status resolved => closed
2018-11-08 19:34 caristu Fixed in Version => 3.0PR19Q1
2018-12-11 20:22 hudsonbot Checkin
2018-12-11 20:22 hudsonbot Note Added: 0108451


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker