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:
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.4#6332)