Closed joelkuiper closed 11 years ago
Hi Joël, any chance you're running Monger (a Clojure MongoDB client)?
What happens if you run (read-string (pr-str (java.util.Date.)))
?
What about (binding [*read-eval* false] (read-string (pr-str (java.util.Date.))))
?
For safety, Nippy disables *read-eval*
by default. If either of the above throw an exception then you or a library have configured the Clojure reader to print dates using a method that requires *read-eval*
. Ideal solution would be to sort out the print method.
In any event, James will be bringing some changes to Nippy soon (one PR referenced above, another to add binary serialization for Dates). Not sure if the first will sort this out, but the second certainly will since it'll bypass the reader altogether.
Hope that helps! Cheers :-)
@ptaoussanis Yeah I'm running Monger too however the pr-str's do not throw an error. I'll be awaiting the next release then :smile: the system is not in production yet so I can get by with setting the reader-eval for now!
Okay, I mentioned Monger because that's one of the libraries I know that can cause this problem.
In any case, just pushed v2.0.0-RC1
with James' changes. This version should completely sidestep any reader issues you're seeing.
Closing this for now; feel free to reopen if you're still running into any trouble. Cheers!
When running thaw on java.util.Date a runtime exception is thrown in Clojure 1.5.1 and nippy 2.1.0
Is there a work around for this (other than disabling the reader check?)