owainlewis / clojure-mail

A Clojure library for parsing, downloading and reading email from IMAP servers.
202 stars 54 forks source link

Unable to find static field in com.sun.mail.imap.IMAPFolder$FetchProfileItem #54

Closed nrakochy closed 7 years ago

nrakochy commented 7 years ago

Hello there.

I added clojure-mail to my project and am now unable to compile the project. I ran across this similar bug report which might be helpful.

Attached are a few screenshots. I'm not sure if this is user error (me) or a bug further upstream, and I would appreciate any insight which you might have to sort it out. Many thanks.

Runtime Exception: imap_exception

Project ns: email_parser

Maven repo locally installed: mvn_clojure_mail

pmensik commented 7 years ago

I can confirm I am having the same issue.

spicalous commented 7 years ago

@nrakochy @pmensik Try running lein deps :tree in your project directory and ensure that you are using at least version 1.5.2 of com.sun.mail/javax.mail

FetchProfileItem.MESSAGE was added in version 1.5.2

https://javamail.java.net/nonav/docs/api/com/sun/mail/imap/IMAPFolder.FetchProfileItem.html#MESSAGE

I had the same problem where another dependency was using a lower version of javax.mail

nrakochy commented 7 years ago

Thanks @spicalous. I think your last comment might do the trick. I am using postal which is using javax.mail 1.5.5 whereas clojure-mail is on 1.5.4 at the moment.