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

女生的网名这么多〃 提交于 2019-12-05 09:53:44
pete23

This is a tricky question to answer without much context. However you seem to be falling foul of http://dev.clojure.org/jira/browse/CLJ-1210 which points out that this error message is distinctly unhelpful!

Please can you look at Clojure Clostache error - No implementation of method: :make-reader of protocol: #'clojure.java.io/IOFactory found for class: nil which may well be a duplicate. The long and the short of it is that some resource you are referring to does not exist. As a result it is retrieved as "nil" which then results in the trouble you see. Perhaps a case where a library might throw an exception for resource-not-found (or at least have an exception throwing variant).

One of the ways in which I dug around on this was to look at the selmer source code, as that is the first non-clojure.core piece of the stack trace. One of the first things this does is...

(defn validate-tags [template]
    (with-open [rdr (reader template)]

From here some deduction and a quick bit of googling got me to the above.

[2017 update: The unhelpful error was ultimately fixed in Clojure 1.8, so hopefully people will no longer see this issue!]

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!