Hi Dan,

I added the geronimo specs for activation by accident. They are since
replaced in the current starter with the activation bundle we have in
sling. Can you double-check that you are running on a recent snapshot
of sling 11?

regards,


Karl
On Wed, Sep 19, 2018 at 2:42 PM Daniel Klco <[email protected]> wrote:
>
> So I just happened to run into an issue which I'm thinking is related to
> the JRE support and specifically a mismatch between the activation and
> javax.mail jars. Previously I was able to use Commons Email to send emails
> via Apache Sling, but after updating to new JRE support, I'm running into
> the following exception when attempting to send emails:
>
> org.apache.commons.mail.EmailException: Sending the email to the
> following server failed : smtp.sendgrid.net:2525
>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1469)
> [org.apache.commons.email:1.5.0]
>         at org.apache.commons.mail.Email.send(Email.java:1496)
> [org.apache.commons.email:1.5.0]
>         at 
> org.adobecommunity.site.impl.jobs.EmailQueueConsumer.process(EmailQueueConsumer.java:113)
> [org.adobecommunity.site:1.0.0.SNAPSHOT]
>         at 
> org.apache.sling.event.impl.jobs.JobConsumerManager$JobConsumerWrapper.process(JobConsumerManager.java:502)
> [org.apache.sling.event:4.2.12]
>         at 
> org.apache.sling.event.impl.jobs.queues.JobQueueImpl.startJob(JobQueueImpl.java:293)
> [org.apache.sling.event:4.2.12]
>         at 
> org.apache.sling.event.impl.jobs.queues.JobQueueImpl.access$100(JobQueueImpl.java:60)
> [org.apache.sling.event:4.2.12]
>         at 
> org.apache.sling.event.impl.jobs.queues.JobQueueImpl$1.run(JobQueueImpl.java:229)
> [org.apache.sling.event:4.2.12]
>         at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>         at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>         at java.lang.Thread.run(Thread.java:748)
> Caused by: javax.mail.MessagingException: IOException while sending message
>         at 
> com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1167)
> [javax.mail:1.5.0.b01]
>         at javax.mail.Transport.send0(Transport.java:254) 
> [javax.mail:1.5.0.b01]
>         at javax.mail.Transport.send(Transport.java:124) 
> [javax.mail:1.5.0.b01]
>         at org.apache.commons.mail.Email.sendMimeMessage(Email.java:1459)
> [org.apache.commons.email:1.5.0]
>         ... 9 common frames omitted
> Caused by: javax.activation.UnsupportedDataTypeException: text/plain;
> charset=us-ascii
>         at javax.activation.DataHandler.writeTo(DataHandler.java:78)
> [org.apache.geronimo.specs.geronimo-activation_1.1_spec:1.1.0]
>         at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1574)
> [javax.mail:1.5.0.b01]
>         at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1840)
> [javax.mail:1.5.0.b01]
>         at 
> com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1119)
> [javax.mail:1.5.0.b01]
>         ... 12 common frames omitted
>
> I've tried with Commons Email 1.5 and 1.3.3 and adding the MimeType
> mappings as described here:
> https://stackoverflow.com/questions/21856211/javax-activation-unsupporteddatatypeexception-no-object-dch-for-mime-type-multi
>
> I think the issue is that we're using
> org.apache.geronimo.specs.geronimo-activation_1.1_spec:1.1.0 and
> javax.mail:1.5.0.b01.
>
> I've tried pulling in the other Geronimo Mail & spec dependencies and was
> able to send email via the Oracle JDK but not OpenJDK.
>
> Any help would be appreciated, I'm banging my head against this one.
>
> -Dan
>
> On Tue, Sep 18, 2018 at 5:15 AM Robert Munteanu <[email protected]> wrote:
>
> > On Thu, 2018-09-13 at 16:53 +0000, Stefan Seifert wrote:
> > > - in the future new JRE version will come up quite often
> > > - we should set up integration tests for new JRE releases as soon as
> > > possible
> > > - with the changes karl already did for supporting the current JRE
> > > versions is should no longer needed to do any manual changes to the
> > > code (e.g. properties files) for new JRE versions
> >
> > It's worth noting there there is chance of something breaking even
> > though Felix now supports new Java versions transparently. Compiler
> > changes, runtime behaviour changes usually happen and force us to
> > adapt.
> >
> > Robert
> >
> >



-- 
Karl Pauls
[email protected]

Reply via email to