drewr / postal

Clojure email support
MIT License
586 stars 85 forks source link

IOFactory error when used in Uberjar #66

Open jkutner opened 9 years ago

jkutner commented 9 years ago

When postal is used in a uberjar, it fails trying to read the pom.properties file with this error:

java.lang.IllegalArgumentException: No implementation of method: :make-input-stream of protocol: #'clojure.java.io/IOFactory found for class: nil

Stack trace: https://gist.github.com/kirillsalykin/011e5479d0f2b9c2a81d

WORKAROUND: Add -Dpostal.version=1.11.3 to java process

Here is a reproducible example: https://github.com/InspireNL/TeamHappiness

See stackoverflow for discussion: http://stackoverflow.com/questions/32235680/sending-email-with-postal-from-heroku-fires-strange-exception/

martinklepsch commented 9 years ago

I also experienced this issue.

martinklepsch commented 9 years ago

@drewr any chance we can get a patch release if a PR is provided?

drewr commented 8 years ago

Yes! PR welcome. The packaging is very old and needs to be redone. I use a version.txt file in resources/ in other projects which works with uberjars too. Will do it if you don't get to something like that first. Thanks!

danielsz commented 8 years ago

Experienced the same issue.

Dirty hack: (System/setProperty "postal.version" "1.11.3") at runtime.