karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anton Johansson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (KARAF-4154) javax.mail.Message.getContent() returns IMAPInputStream
Date Mon, 30 Nov 2015 17:02:11 GMT
Anton Johansson created KARAF-4154:

             Summary: javax.mail.Message.getContent() returns IMAPInputStream
                 Key: KARAF-4154
                 URL: https://issues.apache.org/jira/browse/KARAF-4154
             Project: Karaf
          Issue Type: Bug
    Affects Versions: 2.4.2
         Environment: Linux Mint 17.2 Cinnamon
Oracle JDK 1.7
            Reporter: Anton Johansson
            Priority: Critical

I'm using JavaMail API to read emails from Gmail IMAP. The emails are of type multipart. I
open up a Store, then I open up a Folder ("INBOX"), then I get the messages from that folder.

Outside of Karaf, when doing message.getContent() I get a javax.mail.internet.MimeMultipart
object back. Doesn't matter if I use version 1.4.5 (the one that Karaf provides) or 1.5.4
(the latest).

Inside Karaf, I get an IMAPInputStream back, which isn't ideal. I'd very much like to get
the MimeMultipart object back. I've tried not adding any JavaMail libraries to Karaf, and
relying on the one that Karaf itself provides (which is 1.4.5, according to the version matrix:
I've also tried adding both javax.mail/javax.mail-api/1.5.4 and com.sun.mail/javax.mail/1.5.4
to Karaf, but the same problem occurs. I guess it still chooses the JAR's that Karaf provides.

Even in the latest version of Karaf, 1.4.5 is used, so I'd guess the same problem exists there,
but I cannot say for sure, I haven't tested.

Am I missing something, or is there some workaround for this?

This message was sent by Atlassian JIRA

View raw message