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

Christian Schneider closed KARAF-4154.
--------------------------------------
    Resolution: Not A Bug
      Assignee: Christian Schneider

I think the provided solution is correct. It is most likely an issue of setting 
up the thread context classloader. I do not think this is a bug in karaf.

It would be better to ask such a question on the karaf user list or on stack 
overflow.

> 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
>            Assignee: Christian Schneider
>            Priority: Critical
>              Labels: javax.mail, mail
>
> 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:
> http://karaf.apache.org/index/documentation/karaf-dependencies/karaf-deps-2.4.x.html
> 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
(v6.3.15#6346)

Reply via email to