karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Merezhin (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (KARAF-5571) send multipart/* email from karaf
Date Wed, 17 Jan 2018 17:06:00 GMT

     [ https://issues.apache.org/jira/browse/KARAF-5571?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Alexey Merezhin updated KARAF-5571:
-----------------------------------
    Description: 
A bundle works well on regular emails but fails on multipart/* emails with following error:

{noformat}
Caused by: javax.mail.MessagingException: MIME part of type "multipart/mixed;
        boundary="_002_457be6a2543c49d6beab8259582750b2SG001741corprootnet_"" contains object
of type javax.mail.util.SharedByteArrayInputStream instead of MimeMultipart
        at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1530) ~[93:com.sun.mail.javax.mail:1.6.0]
        at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2264) ~[93:com.sun.mail.javax.mail:1.6.0]
        at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2224) ~[93:com.sun.mail.javax.mail:1.6.0]
        at ch.e3ag.dlp.opl.task.mail.action.impl.mqur.OplMailReleaseMQURTaskImpl.sendEmail(OplMailReleaseMQURTaskImpl.java:162)
~[?:?]
        ... 17 more
{noformat}

Junit integration test can't reproduce the problem - the same email is working for junit but
fails in karaf for the same versions of javax.mail and activation.jar.

Essentially the problem comes from relations between javax.mail and activation. 
1. javax.mail calls activation library to map mime-types with java classes. 
2. {{MailcapCommandMap}} class from activation needs to read {{META-INF/mailcap}} which is
inside the javax.mail.
The (2) step fails on karaf.

  was:
A bundle works well on regular emails but fails on multipart/* emails with following error:

{noformat}
Caused by: javax.mail.MessagingException: MIME part of type "multipart/mixed;
        boundary="_002_457be6a2543c49d6beab8259582750b2SG001741corprootnet_"" contains object
of type javax.mail.util.SharedByteArrayInputStream instead of MimeMultipart
        at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1530) ~[93:com.sun.mail.javax.mail:1.6.0]
        at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2264) ~[93:com.sun.mail.javax.mail:1.6.0]
        at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2224) ~[93:com.sun.mail.javax.mail:1.6.0]
        at ch.e3ag.dlp.opl.task.mail.action.impl.mqur.OplMailReleaseMQURTaskImpl.sendEmail(OplMailReleaseMQURTaskImpl.java:162)
~[?:?]
        ... 17 more
{noformat}

Junit integration test can't reproduce the problem - the same email is working for junit but
fails in karaf for the same versions of javax.mail and activation.jar.

Essentially the problem comes from relations between javax.mail and activation. 
1. javax.mail calls activation library to map mime-types with java classes. 
2. {{MailcapCommandMap}} class from activation needs to read {{META-INF/mailcap}} which is
inside the javax.mail. This step fails on karaf.


> send multipart/* email from karaf
> ---------------------------------
>
>                 Key: KARAF-5571
>                 URL: https://issues.apache.org/jira/browse/KARAF-5571
>             Project: Karaf
>          Issue Type: Bug
>         Environment: Karaf version - 4.1.4
> System bundles:
>  # javax.mail version 1.6.0
>  # javax.activation version 1.1
>            Reporter: Alexey Merezhin
>            Priority: Major
>
> A bundle works well on regular emails but fails on multipart/* emails with following
error:
> {noformat}
> Caused by: javax.mail.MessagingException: MIME part of type "multipart/mixed;
>         boundary="_002_457be6a2543c49d6beab8259582750b2SG001741corprootnet_"" contains
object of type javax.mail.util.SharedByteArrayInputStream instead of MimeMultipart
>         at javax.mail.internet.MimeBodyPart.updateHeaders(MimeBodyPart.java:1530) ~[93:com.sun.mail.javax.mail:1.6.0]
>         at javax.mail.internet.MimeMessage.updateHeaders(MimeMessage.java:2264) ~[93:com.sun.mail.javax.mail:1.6.0]
>         at javax.mail.internet.MimeMessage.saveChanges(MimeMessage.java:2224) ~[93:com.sun.mail.javax.mail:1.6.0]
>         at ch.e3ag.dlp.opl.task.mail.action.impl.mqur.OplMailReleaseMQURTaskImpl.sendEmail(OplMailReleaseMQURTaskImpl.java:162)
~[?:?]
>         ... 17 more
> {noformat}
> Junit integration test can't reproduce the problem - the same email is working for junit
but fails in karaf for the same versions of javax.mail and activation.jar.
> Essentially the problem comes from relations between javax.mail and activation. 
> 1. javax.mail calls activation library to map mime-types with java classes. 
> 2. {{MailcapCommandMap}} class from activation needs to read {{META-INF/mailcap}} which
is inside the javax.mail.
> The (2) step fails on karaf.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message