Details

      Description

      Steps to reproduce:

      1. Compile portal on JDK8
      2. Start portal on JDK11
      3. Login
      4. Go to Message Boards
      5. Add a new thread
      6. Publish (to trigger email)

      Also reproduced using Workflow, or creating a new user account.

      Expected Result:
      Email is sent, no errors are thrown.

      Actual Result:
      No email is sent due to ClassCastException

      ERROR [liferay/mail-1][ParallelDestination:55] Unable to process message {destinationName=liferay/mail, response=null, responseDestinationName=null, responseId=null, payload=com.liferay.mail.kernel.model.MailMessage@5777fbfd, values={defaultLocale=en_US, companyId=20099, groupId=0, principalName=20139, permissionChecker=com.liferay.portal.kernel.util.TransientValue@4c6aa89f, siteDefaultLocale=en_US, themeDisplayLocale=en_US}}
      com.liferay.portal.kernel.messaging.MessageListenerException: com.liferay.petra.mail.MailEngineException: java.lang.ClassCastException: class com.sun.mail.handlers.text_html cannot be cast to class javax.activation.DataContentHandler (com.sun.mail.handlers.text_html is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @5b43fbf6; javax.activation.DataContentHandler is in unnamed module of loader java.net.URLClassLoader @4e9ba398)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:32)
      	at com.liferay.portal.kernel.messaging.InvokerMessageListener.receive(InvokerMessageListener.java:74)
      	at com.liferay.portal.kernel.messaging.ParallelDestination$1.run(ParallelDestination.java:52)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask._runTask(ThreadPoolExecutor.java:752)
      	at com.liferay.portal.kernel.concurrent.ThreadPoolExecutor$WorkerTask.run(ThreadPoolExecutor.java:664)
      	at java.base/java.lang.Thread.run(Thread.java:834)
      Caused by: com.liferay.petra.mail.MailEngineException: java.lang.ClassCastException: class com.sun.mail.handlers.text_html cannot be cast to class javax.activation.DataContentHandler (com.sun.mail.handlers.text_html is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @5b43fbf6; javax.activation.DataContentHandler is in unnamed module of loader java.net.URLClassLoader @4e9ba398)
      	at com.liferay.petra.mail.MailEngine.send(MailEngine.java:396)
      	at com.liferay.petra.mail.MailEngine.send(MailEngine.java:461)
      	at com.liferay.mail.messaging.MailMessageListener.doMailMessage(MailMessageListener.java:94)
      	at com.liferay.mail.messaging.MailMessageListener.doReceive(MailMessageListener.java:109)
      	at com.liferay.portal.kernel.messaging.BaseMessageListener.receive(BaseMessageListener.java:26)
      	... 5 more
      Caused by: java.lang.ClassCastException: class com.sun.mail.handlers.text_html cannot be cast to class javax.activation.DataContentHandler (com.sun.mail.handlers.text_html is in unnamed module of loader org.apache.catalina.loader.ParallelWebappClassLoader @5b43fbf6; javax.activation.DataContentHandler is in unnamed module of loader java.net.URLClassLoader @4e9ba398)
      	at javax.activation.MailcapCommandMap.getDataContentHandler(MailcapCommandMap.java:596)
      	at javax.activation.MailcapCommandMap.createDataContentHandler(MailcapCommandMap.java:550)
      	at javax.activation.DataHandler.getDataContentHandler(DataHandler.java:611)
      	at javax.activation.DataHandler.writeTo(DataHandler.java:315)
      	at javax.mail.internet.MimeUtility.getEncoding(MimeUtility.java:248)
      	at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1268)
      	at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2012)
      	at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:1980)
      	at javax.mail.Transport.send(Transport.java:119)
      	at com.liferay.petra.mail.MailEngine._send(MailEngine.java:618)
      	at com.liferay.petra.mail.MailEngine.send(MailEngine.java:386)
      	... 9 more
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                anthony.chu Anthony Chu
                Reporter:
                victor.ware Victor Ware
                Participants of an Issue:
                Recent user:
                Csaba Turcsan
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  32 weeks, 2 days ago

                  Packages

                  Version Package
                  7.1.10 DXP FP4
                  7.1.10.1 SP1
                  7.1.2 CE GA3
                  7.1.X
                  Master